FileDocCategorySizeDatePackage
HardwareCanvas.javaAPI DocAndroid 5.1 API3929Thu Mar 12 22:22:10 GMT 2015android.view

HardwareCanvas

public abstract class HardwareCanvas extends android.graphics.Canvas
Hardware accelerated canvas.
hide

Fields Summary
Constructors Summary
Methods Summary
public abstract intcallDrawGLFunction2(long drawGLFunction)
Calls the function specified with the drawGLFunction function pointer. This is functionality used by webkit for calling into their renderer from our display lists. This function may return true if an invalidation is needed after the call.

param
drawGLFunction A native function pointer
return
{@link RenderNode#STATUS_DONE}
hide

public abstract voiddrawCircle(android.graphics.CanvasProperty cx, android.graphics.CanvasProperty cy, android.graphics.CanvasProperty radius, android.graphics.CanvasProperty paint)

abstract voiddrawHardwareLayer(HardwareLayer layer, float x, float y, android.graphics.Paint paint)
Draws the specified layer onto this canvas.

param
layer The layer to composite on this canvas
param
x The left coordinate of the layer
param
y The top coordinate of the layer
param
paint The paint used to draw the layer
hide

public voiddrawRenderNode(RenderNode renderNode)
Draws the specified display list onto this canvas. The display list can only be drawn if {@link android.view.RenderNode#isValid()} returns true.

param
renderNode The RenderNode to replay.

        drawRenderNode(renderNode, null, RenderNode.FLAG_CLIP_CHILDREN);
    
public abstract intdrawRenderNode(RenderNode renderNode, android.graphics.Rect dirty, int flags)
Draws the specified display list onto this canvas.

param
renderNode The RenderNode to replay.
param
dirty Ignored, can be null.
param
flags Optional flags about drawing, see {@link RenderNode} for the possible flags.
return
One of {@link RenderNode#STATUS_DONE} or {@link RenderNode#STATUS_DREW} if anything was drawn.
hide

public abstract voiddrawRoundRect(android.graphics.CanvasProperty left, android.graphics.CanvasProperty top, android.graphics.CanvasProperty right, android.graphics.CanvasProperty bottom, android.graphics.CanvasProperty rx, android.graphics.CanvasProperty ry, android.graphics.CanvasProperty paint)

public booleanisHardwareAccelerated()

        return true;
    
public abstract voidonPostDraw()
Invoked after all drawing operation have been performed.

hide

public abstract intonPreDraw(android.graphics.Rect dirty)
Invoked before any drawing operation is performed in this canvas.

param
dirty The dirty rectangle to update, can be null.
return
{@link RenderNode#STATUS_DREW} if anything was drawn (such as a call to clear the canvas).
hide

public voidsetBitmap(android.graphics.Bitmap bitmap)

        throw new UnsupportedOperationException();
    
public static voidsetProperty(java.lang.String name, java.lang.String value)

        GLES20Canvas.setProperty(name, value);