LibreOffice Module android (master) 1
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
org.mozilla.gecko.gfx.ComposedTileLayer Class Referenceabstract
Inheritance diagram for org.mozilla.gecko.gfx.ComposedTileLayer:
[legend]
Collaboration diagram for org.mozilla.gecko.gfx.ComposedTileLayer:
[legend]

Public Member Functions

 ComposedTileLayer (Context context)
 
void invalidate ()
 
void beginTransaction ()
 Call this before modifying the layer. More...
 
void endTransaction ()
 Call this when you're done modifying the layer. More...
 
void draw (RenderContext context)
 Subclasses override this function to draw the layer. More...
 
Region getValidRegion (RenderContext context)
 Returns the region of the layer that is considered valid. More...
 
void setResolution (float newResolution)
 Sets the layer resolution. More...
 
void reevaluateTiles (ImmutableViewportMetrics viewportMetrics, DisplayPortMetrics mDisplayPort)
 
void addNewTiles (List< SubTile > newTiles)
 
void clearMarkedTiles ()
 
void markTiles ()
 
void clearAndReset ()
 
boolean isStillValid (TileIdentifier tileId)
 
void invalidateTiles (List< SubTile > tilesToInvalidate, RectF cssRect)
 Invalidate tiles which intersect the input rect. More...
 
void onConfigurationChanged (Configuration newConfig)
 
void onLowMemory ()
 
void onTrimMemory (int level)
 
- Public Member Functions inherited from org.mozilla.gecko.gfx.Layer
 Layer ()
 
 Layer (IntSize size)
 
final boolean update (RenderContext context)
 Updates the layer. More...
 
abstract void draw (RenderContext context)
 Subclasses override this function to draw the layer. More...
 
Region getValidRegion (RenderContext context)
 Returns the region of the layer that is considered valid. More...
 
void beginTransaction ()
 Call this before modifying the layer. More...
 
void endTransaction ()
 Call this when you're done modifying the layer. More...
 
Rect getPosition ()
 Returns the current layer position. More...
 
void setPosition (Rect newPosition)
 Sets the position. More...
 
float getResolution ()
 Returns the current layer's resolution. More...
 
void setResolution (float newResolution)
 Sets the layer resolution. More...
 
boolean usesDefaultProgram ()
 

Protected Member Functions

void performUpdates (RenderContext context)
 Subclasses may override this method to perform custom layer updates. More...
 
abstract RectF getViewPort (ImmutableViewportMetrics viewportMetrics)
 
abstract float getZoom (ImmutableViewportMetrics viewportMetrics)
 
abstract int getTilePriority ()
 
- Protected Member Functions inherited from org.mozilla.gecko.gfx.Layer
RectF getBounds (RenderContext context)
 Given the intrinsic size of the layer, returns the pixel boundaries of the layer rect. More...
 
boolean inTransaction ()
 Returns true if the layer is currently in a transaction and false otherwise. More...
 
void performUpdates (RenderContext context)
 Subclasses may override this method to perform custom layer updates. More...
 
final void fillRectCoordBuffer (float[] dest, RectF rect, float viewWidth, float viewHeight, Rect cropRect, float texWidth, float texHeight)
 This function fills in the provided dest array with values to render a texture. More...
 

Static Protected Member Functions

static RectF roundToTileSize (RectF input, IntSize tileSize)
 
static RectF inflate (RectF rect, IntSize inflateSize)
 
static RectF normalizeRect (RectF rect, float sourceFactor, float targetFactor)
 

Protected Attributes

final List< SubTiletiles = new ArrayList<SubTile>()
 
final IntSize tileSize
 
RectF currentViewport = new RectF()
 
float currentZoom = 1.0f
 
RectF currentPageRect = new RectF()
 
- Protected Attributes inherited from org.mozilla.gecko.gfx.Layer
Rect mPosition
 
float mResolution
 
boolean mUsesDefaultProgram = true
 

Private Member Functions

boolean containsTilesMatching (float x, float y, float currentZoom)
 
SubTile createNewTile (TileIdentifier tileId)
 

Private Attributes

final ReadWriteLock tilesReadWriteLock = new ReentrantReadWriteLock()
 
final Lock tilesReadLock = tilesReadWriteLock.readLock()
 
final Lock tilesWriteLock = tilesReadWriteLock.writeLock()
 
long reevaluationNanoTime = 0
 

Static Private Attributes

static final String LOGTAG = ComposedTileLayer.class.getSimpleName()
 

Detailed Description

Definition at line 21 of file ComposedTileLayer.java.

Constructor & Destructor Documentation

◆ ComposedTileLayer()

org.mozilla.gecko.gfx.ComposedTileLayer.ComposedTileLayer ( Context  context)
inline

Definition at line 37 of file ComposedTileLayer.java.

Member Function Documentation

◆ addNewTiles()

void org.mozilla.gecko.gfx.ComposedTileLayer.addNewTiles ( List< SubTile newTiles)
inline

◆ beginTransaction()

void org.mozilla.gecko.gfx.ComposedTileLayer.beginTransaction ( )
inline

Call this before modifying the layer.

Note that, for TileLayers, "modifying the layer" includes altering the underlying CairoImage in any way. Thus you must call this function before modifying the byte buffer associated with this layer.

This function may block, so you should never call this on the main UI thread.

Reimplemented from org.mozilla.gecko.gfx.Layer.

Definition at line 81 of file ComposedTileLayer.java.

References org.mozilla.gecko.gfx.ComposedTileLayer.tiles, and org.mozilla.gecko.gfx.ComposedTileLayer.tilesReadLock.

Referenced by org.mozilla.gecko.gfx.GeckoLayerClient.beginDrawing().

◆ clearAndReset()

void org.mozilla.gecko.gfx.ComposedTileLayer.clearAndReset ( )
inline

◆ clearMarkedTiles()

void org.mozilla.gecko.gfx.ComposedTileLayer.clearMarkedTiles ( )
inline

◆ containsTilesMatching()

boolean org.mozilla.gecko.gfx.ComposedTileLayer.containsTilesMatching ( float  x,
float  y,
float  currentZoom 
)
inlineprivate

◆ createNewTile()

SubTile org.mozilla.gecko.gfx.ComposedTileLayer.createNewTile ( TileIdentifier  tileId)
inlineprivate

◆ draw()

void org.mozilla.gecko.gfx.ComposedTileLayer.draw ( RenderContext  context)
inline

◆ endTransaction()

void org.mozilla.gecko.gfx.ComposedTileLayer.endTransaction ( )
inline

Call this when you're done modifying the layer.

Reimplemented from org.mozilla.gecko.gfx.Layer.

Definition at line 91 of file ComposedTileLayer.java.

References org.mozilla.gecko.gfx.ComposedTileLayer.tiles, and org.mozilla.gecko.gfx.ComposedTileLayer.tilesReadLock.

Referenced by org.mozilla.gecko.gfx.GeckoLayerClient.endDrawing().

◆ getTilePriority()

abstract int org.mozilla.gecko.gfx.ComposedTileLayer.getTilePriority ( )
abstractprotected

◆ getValidRegion()

Region org.mozilla.gecko.gfx.ComposedTileLayer.getValidRegion ( RenderContext  context)
inline

Returns the region of the layer that is considered valid.

The default implementation of this will return the bounds of the layer, but this may be overridden.

Reimplemented from org.mozilla.gecko.gfx.Layer.

Definition at line 126 of file ComposedTileLayer.java.

References org.mozilla.gecko.gfx.ComposedTileLayer.tiles, and org.mozilla.gecko.gfx.ComposedTileLayer.tilesReadLock.

◆ getViewPort()

abstract RectF org.mozilla.gecko.gfx.ComposedTileLayer.getViewPort ( ImmutableViewportMetrics  viewportMetrics)
abstractprotected

◆ getZoom()

abstract float org.mozilla.gecko.gfx.ComposedTileLayer.getZoom ( ImmutableViewportMetrics  viewportMetrics)
abstractprotected

◆ inflate()

static RectF org.mozilla.gecko.gfx.ComposedTileLayer.inflate ( RectF  rect,
IntSize  inflateSize 
)
inlinestaticprotected

◆ invalidate()

void org.mozilla.gecko.gfx.ComposedTileLayer.invalidate ( )
inline

◆ invalidateTiles()

void org.mozilla.gecko.gfx.ComposedTileLayer.invalidateTiles ( List< SubTile tilesToInvalidate,
RectF  cssRect 
)
inline

◆ isStillValid()

boolean org.mozilla.gecko.gfx.ComposedTileLayer.isStillValid ( TileIdentifier  tileId)
inline

◆ markTiles()

void org.mozilla.gecko.gfx.ComposedTileLayer.markTiles ( )
inline

◆ normalizeRect()

static RectF org.mozilla.gecko.gfx.ComposedTileLayer.normalizeRect ( RectF  rect,
float  sourceFactor,
float  targetFactor 
)
inlinestaticprotected

◆ onConfigurationChanged()

void org.mozilla.gecko.gfx.ComposedTileLayer.onConfigurationChanged ( Configuration  newConfig)
inline

Definition at line 274 of file ComposedTileLayer.java.

◆ onLowMemory()

void org.mozilla.gecko.gfx.ComposedTileLayer.onLowMemory ( )
inline

Definition at line 278 of file ComposedTileLayer.java.

References Log, and org.mozilla.gecko.gfx.ComposedTileLayer.LOGTAG.

◆ onTrimMemory()

void org.mozilla.gecko.gfx.ComposedTileLayer.onTrimMemory ( int  level)
inline

Definition at line 283 of file ComposedTileLayer.java.

References Log, and org.mozilla.gecko.gfx.ComposedTileLayer.LOGTAG.

◆ performUpdates()

void org.mozilla.gecko.gfx.ComposedTileLayer.performUpdates ( RenderContext  context)
inlineprotected

Subclasses may override this method to perform custom layer updates.

This will be called with the transaction lock held. Subclass implementations of this method must call the superclass implementation. Returns false if there is still work to be done after this update is complete.

Reimplemented from org.mozilla.gecko.gfx.Layer.

Definition at line 112 of file ComposedTileLayer.java.

References org.mozilla.gecko.gfx.ComposedTileLayer.tiles, and org.mozilla.gecko.gfx.ComposedTileLayer.tilesReadLock.

◆ reevaluateTiles()

void org.mozilla.gecko.gfx.ComposedTileLayer.reevaluateTiles ( ImmutableViewportMetrics  viewportMetrics,
DisplayPortMetrics  mDisplayPort 
)
inline

◆ roundToTileSize()

static RectF org.mozilla.gecko.gfx.ComposedTileLayer.roundToTileSize ( RectF  input,
IntSize  tileSize 
)
inlinestaticprotected

◆ setResolution()

void org.mozilla.gecko.gfx.ComposedTileLayer.setResolution ( float  newResolution)
inline

Sets the layer resolution.

This value is used to determine how many pixels per device pixel this layer was rendered at. This will be reflected by scaling by the reciprocal of the resolution in the layer's transform() function. Only valid inside a transaction.

Reimplemented from org.mozilla.gecko.gfx.Layer.

Definition at line 137 of file ComposedTileLayer.java.

References org.mozilla.gecko.gfx.ComposedTileLayer.tiles, and org.mozilla.gecko.gfx.ComposedTileLayer.tilesReadLock.

Member Data Documentation

◆ currentPageRect

RectF org.mozilla.gecko.gfx.ComposedTileLayer.currentPageRect = new RectF()
protected

◆ currentViewport

RectF org.mozilla.gecko.gfx.ComposedTileLayer.currentViewport = new RectF()
protected

◆ currentZoom

float org.mozilla.gecko.gfx.ComposedTileLayer.currentZoom = 1.0f
protected

◆ LOGTAG

final String org.mozilla.gecko.gfx.ComposedTileLayer.LOGTAG = ComposedTileLayer.class.getSimpleName()
staticprivate

◆ reevaluationNanoTime

long org.mozilla.gecko.gfx.ComposedTileLayer.reevaluationNanoTime = 0
private

◆ tiles

final List<SubTile> org.mozilla.gecko.gfx.ComposedTileLayer.tiles = new ArrayList<SubTile>()
protected

◆ tileSize

final IntSize org.mozilla.gecko.gfx.ComposedTileLayer.tileSize
protected

◆ tilesReadLock

final Lock org.mozilla.gecko.gfx.ComposedTileLayer.tilesReadLock = tilesReadWriteLock.readLock()
private

◆ tilesReadWriteLock

final ReadWriteLock org.mozilla.gecko.gfx.ComposedTileLayer.tilesReadWriteLock = new ReentrantReadWriteLock()
private

Definition at line 27 of file ComposedTileLayer.java.

◆ tilesWriteLock

final Lock org.mozilla.gecko.gfx.ComposedTileLayer.tilesWriteLock = tilesReadWriteLock.writeLock()
private

The documentation for this class was generated from the following file: