LibreOffice Module android (master) 1
|
Draws a small rect. More...
Public Member Functions | |
boolean | fade () |
Decrease the opacity of the scrollbar by one frame's worth. More... | |
boolean | unfade () |
Restore the opacity of the scrollbar to fully opaque. More... | |
void | draw (RenderContext context) |
Subclasses override this function to draw the layer. More... | |
Public Member Functions inherited from org.mozilla.gecko.gfx.TileLayer | |
CairoImage | getImage () |
TileLayer (CairoImage image, PaintMode paintMode) | |
void | destroy () |
void | setPaintMode (PaintMode mode) |
void | invalidate () |
Invalidates the entire buffer so that it will be uploaded again. More... | |
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 () |
Static Public Member Functions | |
static ScrollbarLayer | create (LayerRenderer renderer, boolean vertical) |
Static Public Attributes | |
static final long | FADE_DELAY = 500 |
Private Member Functions | |
ScrollbarLayer (LayerRenderer renderer, CairoImage image, boolean vertical, ByteBuffer buffer) | |
void | createProgram () |
void | activateProgram () |
void | deactivateProgram () |
RectF | getVerticalRect (RenderContext context) |
RectF | getHorizontalRect (RenderContext context) |
Private Attributes | |
final boolean | mVertical |
final Bitmap | mBitmap |
final Canvas | mCanvas |
float | mOpacity |
LayerRenderer | mRenderer |
int | mProgram |
int | mPositionHandle |
int | mTextureHandle |
int | mSampleHandle |
int | mTMatrixHandle |
int | mOpacityHandle |
Static Private Attributes | |
static String | LOGTAG = LayerView.class.getName() |
static final float | FADE_AMOUNT = 0.03f |
static final int | PADDING = 1 |
static final int | BAR_SIZE = 6 |
static final int | CAP_RADIUS = (BAR_SIZE / 2) |
static final String | FRAGMENT_SHADER |
static final float | TEX_HEIGHT = 8.0f |
static final float | TEX_WIDTH = 8.0f |
static final float[] | BODY_TEX_COORDS |
static final float[] | TOP_CAP_TEX_COORDS |
static final float[] | BOT_CAP_TEX_COORDS |
static final float[] | LEFT_CAP_TEX_COORDS |
static final float[] | RIGHT_CAP_TEX_COORDS |
Additional Inherited Members | |
Protected Member Functions inherited from org.mozilla.gecko.gfx.TileLayer | |
boolean | repeats () |
boolean | stretches () |
int | getTextureID () |
boolean | initialized () |
void | finalize () throws Throwable |
void | performUpdates (RenderContext context) |
Subclasses may override this method to perform custom layer updates. More... | |
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... | |
Protected Attributes inherited from org.mozilla.gecko.gfx.TileLayer | |
final CairoImage | mImage |
Protected Attributes inherited from org.mozilla.gecko.gfx.Layer | |
Rect | mPosition |
float | mResolution |
boolean | mUsesDefaultProgram = true |
Draws a small rect.
This is scaled to become a scrollbar.
Definition at line 26 of file ScrollbarLayer.java.
|
inlineprivate |
Definition at line 109 of file ScrollbarLayer.java.
References Bitmap, org.mozilla.gecko.gfx.ScrollbarLayer.CAP_RADIUS, Color, org.mozilla.gecko.gfx.CairoImage.getSize(), org.mozilla.gecko.gfx.ScrollbarLayer.mBitmap, org.mozilla.gecko.gfx.ScrollbarLayer.mCanvas, org.mozilla.gecko.gfx.ScrollbarLayer.mRenderer, org.mozilla.gecko.gfx.ScrollbarLayer.mVertical, org.mozilla.gecko.gfx.TileLayer.PaintMode.NORMAL, Paint, and size.
Referenced by org.mozilla.gecko.gfx.ScrollbarLayer.create().
|
inlineprivate |
Definition at line 159 of file ScrollbarLayer.java.
References org.mozilla.gecko.gfx.LayerRenderer.DEFAULT_TEXTURE_MATRIX, org.mozilla.gecko.gfx.ScrollbarLayer.mOpacity, org.mozilla.gecko.gfx.ScrollbarLayer.mOpacityHandle, org.mozilla.gecko.gfx.ScrollbarLayer.mPositionHandle, org.mozilla.gecko.gfx.ScrollbarLayer.mProgram, org.mozilla.gecko.gfx.ScrollbarLayer.mSampleHandle, org.mozilla.gecko.gfx.ScrollbarLayer.mTextureHandle, and org.mozilla.gecko.gfx.ScrollbarLayer.mTMatrixHandle.
Referenced by org.mozilla.gecko.gfx.ScrollbarLayer.draw().
|
inlinestatic |
Definition at line 130 of file ScrollbarLayer.java.
References org.mozilla.gecko.gfx.ScrollbarLayer.BAR_SIZE, org.mozilla.gecko.gfx.CairoImage.FORMAT_ARGB32, imageSize(), org.mozilla.gecko.gfx.IntSize.nextPowerOfTwo(), and org.mozilla.gecko.gfx.ScrollbarLayer.ScrollbarLayer().
Referenced by org.mozilla.gecko.gfx.LayerRenderer.LayerRenderer().
|
inlineprivate |
Definition at line 140 of file ScrollbarLayer.java.
References org.mozilla.gecko.gfx.LayerRenderer.DEFAULT_VERTEX_SHADER, org.mozilla.gecko.gfx.ScrollbarLayer.FRAGMENT_SHADER, org.mozilla.gecko.gfx.LayerRenderer.loadShader(), org.mozilla.gecko.gfx.ScrollbarLayer.mOpacityHandle, org.mozilla.gecko.gfx.ScrollbarLayer.mPositionHandle, org.mozilla.gecko.gfx.ScrollbarLayer.mProgram, org.mozilla.gecko.gfx.ScrollbarLayer.mSampleHandle, org.mozilla.gecko.gfx.ScrollbarLayer.mTextureHandle, and org.mozilla.gecko.gfx.ScrollbarLayer.mTMatrixHandle.
Referenced by org.mozilla.gecko.gfx.ScrollbarLayer.draw().
|
inlineprivate |
Definition at line 175 of file ScrollbarLayer.java.
References org.mozilla.gecko.gfx.ScrollbarLayer.mPositionHandle, and org.mozilla.gecko.gfx.ScrollbarLayer.mTextureHandle.
Referenced by org.mozilla.gecko.gfx.ScrollbarLayer.draw().
|
inline |
Subclasses override this function to draw the layer.
Reimplemented from org.mozilla.gecko.gfx.Layer.
Definition at line 213 of file ScrollbarLayer.java.
References org.mozilla.gecko.gfx.LayerRenderer.activateDefaultProgram(), org.mozilla.gecko.gfx.ScrollbarLayer.activateProgram(), org.mozilla.gecko.gfx.ScrollbarLayer.BAR_SIZE, org.mozilla.gecko.gfx.ScrollbarLayer.BODY_TEX_COORDS, org.mozilla.gecko.gfx.ScrollbarLayer.BOT_CAP_TEX_COORDS, org.mozilla.gecko.gfx.ScrollbarLayer.CAP_RADIUS, org.mozilla.gecko.gfx.Layer.RenderContext.coordBuffer, org.mozilla.gecko.gfx.ScrollbarLayer.createProgram(), org.mozilla.gecko.gfx.LayerRenderer.deactivateDefaultProgram(), org.mozilla.gecko.gfx.ScrollbarLayer.deactivateProgram(), org.mozilla.gecko.gfx.ScrollbarLayer.getHorizontalRect(), org.mozilla.gecko.gfx.TileLayer.getTextureID(), org.mozilla.gecko.gfx.ScrollbarLayer.getVerticalRect(), org.mozilla.gecko.gfx.TileLayer.initialized(), org.mozilla.gecko.gfx.ScrollbarLayer.LEFT_CAP_TEX_COORDS, org.mozilla.gecko.gfx.ScrollbarLayer.mPositionHandle, org.mozilla.gecko.gfx.ScrollbarLayer.mProgram, org.mozilla.gecko.gfx.ScrollbarLayer.mRenderer, org.mozilla.gecko.gfx.ScrollbarLayer.mTextureHandle, org.mozilla.gecko.gfx.ScrollbarLayer.mVertical, Rect, org.mozilla.gecko.gfx.ScrollbarLayer.RIGHT_CAP_TEX_COORDS, org.mozilla.gecko.gfx.RectUtils.round(), top, org.mozilla.gecko.gfx.ScrollbarLayer.TOP_CAP_TEX_COORDS, and org.mozilla.gecko.gfx.Layer.RenderContext.viewport.
Referenced by org.mozilla.gecko.gfx.LayerRenderer.Frame.drawForeground().
|
inline |
Decrease the opacity of the scrollbar by one frame's worth.
Return true if the opacity was decreased, or false if the scrollbars are already fully faded out.
Definition at line 186 of file ScrollbarLayer.java.
References org.mozilla.gecko.gfx.Layer.beginTransaction(), org.mozilla.gecko.gfx.Layer.endTransaction(), org.mozilla.gecko.gfx.ScrollbarLayer.FADE_AMOUNT, org.mozilla.gecko.util.FloatUtils.fuzzyEquals(), Math, and org.mozilla.gecko.gfx.ScrollbarLayer.mOpacity.
Referenced by org.mozilla.gecko.gfx.LayerRenderer.Frame.beginDrawing().
|
inlineprivate |
Definition at line 437 of file ScrollbarLayer.java.
References org.mozilla.gecko.gfx.ScrollbarLayer.BAR_SIZE, bottom, org.mozilla.gecko.gfx.ScrollbarLayer.CAP_RADIUS, middle, org.mozilla.gecko.gfx.ScrollbarLayer.PADDING, org.mozilla.gecko.gfx.Layer.RenderContext.pageRect, and org.mozilla.gecko.gfx.Layer.RenderContext.viewport.
Referenced by org.mozilla.gecko.gfx.ScrollbarLayer.draw().
|
inlineprivate |
Definition at line 424 of file ScrollbarLayer.java.
References org.mozilla.gecko.gfx.ScrollbarLayer.BAR_SIZE, org.mozilla.gecko.gfx.ScrollbarLayer.CAP_RADIUS, middle, org.mozilla.gecko.gfx.ScrollbarLayer.PADDING, org.mozilla.gecko.gfx.Layer.RenderContext.pageRect, right, and org.mozilla.gecko.gfx.Layer.RenderContext.viewport.
Referenced by org.mozilla.gecko.gfx.ScrollbarLayer.draw().
|
inline |
Restore the opacity of the scrollbar to fully opaque.
Return true if the opacity was changed, or false if the scrollbars are already fully opaque.
Definition at line 201 of file ScrollbarLayer.java.
References org.mozilla.gecko.gfx.Layer.beginTransaction(), org.mozilla.gecko.gfx.Layer.endTransaction(), org.mozilla.gecko.util.FloatUtils.fuzzyEquals(), and org.mozilla.gecko.gfx.ScrollbarLayer.mOpacity.
Referenced by org.mozilla.gecko.gfx.LayerRenderer.Frame.beginDrawing().
|
staticprivate |
Definition at line 32 of file ScrollbarLayer.java.
Referenced by org.mozilla.gecko.gfx.ScrollbarLayer.create(), org.mozilla.gecko.gfx.ScrollbarLayer.draw(), org.mozilla.gecko.gfx.ScrollbarLayer.getHorizontalRect(), and org.mozilla.gecko.gfx.ScrollbarLayer.getVerticalRect().
|
staticprivate |
Definition at line 65 of file ScrollbarLayer.java.
Referenced by org.mozilla.gecko.gfx.ScrollbarLayer.draw().
|
staticprivate |
Definition at line 83 of file ScrollbarLayer.java.
Referenced by org.mozilla.gecko.gfx.ScrollbarLayer.draw().
|
staticprivate |
Definition at line 29 of file ScrollbarLayer.java.
Referenced by org.mozilla.gecko.gfx.ScrollbarLayer.fade().
|
static |
Definition at line 28 of file ScrollbarLayer.java.
Referenced by org.mozilla.gecko.gfx.LayerRenderer.Frame.beginDrawing().
|
staticprivate |
Definition at line 49 of file ScrollbarLayer.java.
Referenced by org.mozilla.gecko.gfx.ScrollbarLayer.createProgram().
|
staticprivate |
Definition at line 92 of file ScrollbarLayer.java.
Referenced by org.mozilla.gecko.gfx.ScrollbarLayer.draw().
|
staticprivate |
Definition at line 27 of file ScrollbarLayer.java.
|
private |
Definition at line 36 of file ScrollbarLayer.java.
Referenced by org.mozilla.gecko.gfx.ScrollbarLayer.ScrollbarLayer().
|
private |
Definition at line 37 of file ScrollbarLayer.java.
Referenced by org.mozilla.gecko.gfx.ScrollbarLayer.ScrollbarLayer().
|
private |
Definition at line 38 of file ScrollbarLayer.java.
Referenced by org.mozilla.gecko.gfx.ScrollbarLayer.activateProgram(), org.mozilla.gecko.gfx.ScrollbarLayer.fade(), and org.mozilla.gecko.gfx.ScrollbarLayer.unfade().
|
private |
Definition at line 46 of file ScrollbarLayer.java.
Referenced by org.mozilla.gecko.gfx.ScrollbarLayer.activateProgram(), and org.mozilla.gecko.gfx.ScrollbarLayer.createProgram().
|
private |
|
private |
Definition at line 41 of file ScrollbarLayer.java.
Referenced by org.mozilla.gecko.gfx.ScrollbarLayer.activateProgram(), org.mozilla.gecko.gfx.ScrollbarLayer.createProgram(), and org.mozilla.gecko.gfx.ScrollbarLayer.draw().
|
private |
Definition at line 40 of file ScrollbarLayer.java.
Referenced by org.mozilla.gecko.gfx.ScrollbarLayer.draw(), and org.mozilla.gecko.gfx.ScrollbarLayer.ScrollbarLayer().
|
private |
Definition at line 44 of file ScrollbarLayer.java.
Referenced by org.mozilla.gecko.gfx.ScrollbarLayer.activateProgram(), and org.mozilla.gecko.gfx.ScrollbarLayer.createProgram().
|
private |
|
private |
Definition at line 45 of file ScrollbarLayer.java.
Referenced by org.mozilla.gecko.gfx.ScrollbarLayer.activateProgram(), and org.mozilla.gecko.gfx.ScrollbarLayer.createProgram().
|
private |
Definition at line 35 of file ScrollbarLayer.java.
Referenced by org.mozilla.gecko.gfx.ScrollbarLayer.draw(), and org.mozilla.gecko.gfx.ScrollbarLayer.ScrollbarLayer().
|
staticprivate |
Definition at line 31 of file ScrollbarLayer.java.
Referenced by org.mozilla.gecko.gfx.ScrollbarLayer.getHorizontalRect(), and org.mozilla.gecko.gfx.ScrollbarLayer.getVerticalRect().
|
staticprivate |
Definition at line 101 of file ScrollbarLayer.java.
Referenced by org.mozilla.gecko.gfx.ScrollbarLayer.draw().
|
staticprivate |
Definition at line 60 of file ScrollbarLayer.java.
|
staticprivate |
Definition at line 61 of file ScrollbarLayer.java.
|
staticprivate |
Definition at line 74 of file ScrollbarLayer.java.
Referenced by org.mozilla.gecko.gfx.ScrollbarLayer.draw().