Nuke binary plugins 15.1.5
 
Loading...
Searching...
No Matches
DD::Image::ViewerCache Class Referenceabstract

Image cache for the viewer. More...

#include <ViewerCache.h>

Classes

struct  LineEnds
 

Public Types

enum  StartType {
  START_PAUSED , START_NEVER , START_PLAYBACK , START_IF_NO_IMAGE ,
  START_CONTEXT
}
 

Public Member Functions

void preload (DD::Image::Hash viewer_hash)
 
virtual void read_from_cache (DD::Image::Hash viewer_hash, StartType what)
 
virtual void write_to_cache (DD::Image::Hash hash)
 
void deallocateAll ()
 
bool lineDone (int y) const
 
const DD::Image::Boxget_roi () const
 

Static Public Member Functions

static DD::Image::Hash MakeFileHash (DD::Image::Hash hash, int scale, DD::Image::ChannelSet channels)
 
static void InitCache ()
 
static bool BoxPresent (const DD::Image::Hash &hash, const DD::Image::Box &box, int downrez_y)
 

Protected Member Functions

void allocateLine (int y)
 
void deallocateLine (int y)
 
virtual double pixelAspect () const =0
 
virtual DD::Image::Box bbox () const =0
 
virtual void updateBBox (DD::Image::Box newBBox)
 
virtual void readFromCacheDone (bool failed, bool allDone, bool skippedStuff)
 
virtual void updateFrameRange (int first, int last)
 
void setFrameRange (int first, int last)
 

Protected Attributes

AccountedVector< U32 * > lineBuffers
 Array of line pointers.
 
AccountedVector< LineEndslineEnds
 Array of left/right ends.
 
int alloc_w
 
int alloc_h
 Size of image buffer.
 
int width
 
int height
 Size we are using.
 
bool one_block
 Indicates a single allocation of line data.
 
DD::Image::Box roi
 BBox of area to calculate.
 
int viewer_downrez_y
 Viewer downrez factor (integer of 1/yzoom)
 
int processing_downrez_y
 Processing downrez factor. Either the same as viewer_downrez_y or 1, if we're in full frame mode (processing all scanlines regardless of zoom level)
 
bool userRoiEnable
 True if user enabled roi.
 
DD::Image::Box userRoi
 Roi selected by user.
 
bool image_done_
 All visible lines are up to date.
 
bool look_in_cache
 False if we know there is nothing useful in cache file.
 
int scale_
 Size of each channel of a pixel in image buffer.
 

Static Protected Attributes

static int sAllocFudge
 

Detailed Description

Image cache for the viewer.

Member Function Documentation

◆ preload()

void ViewerCache::preload ( DD::Image::Hash  viewer_hash)

Read into the memory cache (but don't try and actually load lines out of this file)

References DD::Image::Image_Cache::mainCache().

◆ read_from_cache()

◆ BoxPresent()

bool ViewerCache::BoxPresent ( const DD::Image::Hash hash,
const DD::Image::Box box,
int  downrez_y 
)
static

Is the given box present in the memory cache for the viewer cache file identified by /hash/

Only lines required for the passed-in downrez will be considered.

References DD::Image::Box::clear(), DD::Image::ImageCacheReadI::close(), DD::Image::Image_Cache::mainCache(), DD::Image::Image_Cache::open(), and DD::Image::ImageCacheReadI::uniqueID().



©2024 The Foundry Visionmongers, Ltd. All Rights Reserved.
www.foundry.com