Lines Matching refs:canvas
79 void SkClearCommand::execute(SkCanvas* canvas) const { in execute()
80 canvas->clear(fColor); in execute()
85 void xlate_and_scale_to_bounds(SkCanvas* canvas, const SkRect& bounds) { in xlate_and_scale_to_bounds() argument
86 const SkISize& size = canvas->getDeviceSize(); in xlate_and_scale_to_bounds()
90 canvas->translate(size.fWidth/2.0f, size.fHeight/2.0f); in xlate_and_scale_to_bounds()
92 canvas->scale(SkDoubleToScalar((kInsetFrac*size.fWidth)/bounds.width()), in xlate_and_scale_to_bounds()
95 canvas->scale(SkDoubleToScalar((kInsetFrac*size.fWidth)/bounds.height()), in xlate_and_scale_to_bounds()
98 canvas->translate(-bounds.centerX(), -bounds.centerY()); in xlate_and_scale_to_bounds()
102 void render_path(SkCanvas* canvas, const SkPath& path) { in render_path() argument
103 canvas->clear(0xFFFFFFFF); in render_path()
104 canvas->save(); in render_path()
108 xlate_and_scale_to_bounds(canvas, bounds); in render_path()
114 canvas->drawPath(path, p); in render_path()
115 canvas->restore(); in render_path()
118 void render_bitmap(SkCanvas* canvas, const SkBitmap& input, const SkRect* srcRect = NULL) { in render_bitmap() argument
119 const SkISize& size = canvas->getDeviceSize(); in render_bitmap()
134 canvas->clear(0xFFFFFFFF); in render_bitmap()
135 canvas->drawBitmapRect(input, NULL, dst); in render_bitmap()
146 canvas->drawRect(r, p); in render_bitmap()
150 void render_rrect(SkCanvas* canvas, const SkRRect& rrect) { in render_rrect() argument
151 canvas->clear(0xFFFFFFFF); in render_rrect()
152 canvas->save(); in render_rrect()
156 xlate_and_scale_to_bounds(canvas, bounds); in render_rrect()
162 canvas->drawRRect(rrect, p); in render_rrect()
163 canvas->restore(); in render_rrect()
166 void render_drrect(SkCanvas* canvas, const SkRRect& outer, const SkRRect& inner) { in render_drrect() argument
167 canvas->clear(0xFFFFFFFF); in render_drrect()
168 canvas->save(); in render_drrect()
172 xlate_and_scale_to_bounds(canvas, bounds); in render_drrect()
178 canvas->drawDRRect(outer, inner, p); in render_drrect()
179 canvas->restore(); in render_drrect()
196 void SkClipPathCommand::execute(SkCanvas* canvas) const { in execute()
197 canvas->clipPath(fPath, fOp, fDoAA); in execute()
200 bool SkClipPathCommand::render(SkCanvas* canvas) const { in render()
201 render_path(canvas, fPath); in render()
214 void SkClipRegionCommand::execute(SkCanvas* canvas) const { in execute()
215 canvas->clipRegion(fRegion, fOp); in execute()
229 void SkClipRectCommand::execute(SkCanvas* canvas) const { in execute()
230 canvas->clipRect(fRect, fOp, fDoAA); in execute()
244 void SkClipRRectCommand::execute(SkCanvas* canvas) const { in execute()
245 canvas->clipRRect(fRRect, fOp, fDoAA); in execute()
248 bool SkClipRRectCommand::render(SkCanvas* canvas) const { in render()
249 render_rrect(canvas, fRRect); in render()
260 void SkConcatCommand::execute(SkCanvas* canvas) const { in execute()
261 canvas->concat(fMatrix); in execute()
285 void SkDrawBitmapCommand::execute(SkCanvas* canvas) const { in execute()
286 canvas->drawBitmap(fBitmap, fLeft, fTop, fPaintPtr); in execute()
289 bool SkDrawBitmapCommand::render(SkCanvas* canvas) const { in render()
290 render_bitmap(canvas, fBitmap); in render()
315 void SkDrawBitmapNineCommand::execute(SkCanvas* canvas) const { in execute()
316 canvas->drawBitmapNine(fBitmap, fCenter, fDst, fPaintPtr); in execute()
319 bool SkDrawBitmapNineCommand::render(SkCanvas* canvas) const { in render()
320 render_bitmap(canvas, fBitmap); in render()
355 void SkDrawBitmapRectCommand::execute(SkCanvas* canvas) const { in execute()
356 canvas->drawBitmapRectToRect(fBitmap, this->srcRect(), fDst, fPaintPtr, fFlags); in execute()
359 bool SkDrawBitmapRectCommand::render(SkCanvas* canvas) const { in render()
360 render_bitmap(canvas, fBitmap, this->srcRect()); in render()
394 void SkDrawOvalCommand::execute(SkCanvas* canvas) const { in execute()
395 canvas->drawOval(fOval, fPaint); in execute()
398 bool SkDrawOvalCommand::render(SkCanvas* canvas) const { in render()
399 canvas->clear(0xFFFFFFFF); in render()
400 canvas->save(); in render()
402 xlate_and_scale_to_bounds(canvas, fOval); in render()
408 canvas->drawOval(fOval, p); in render()
409 canvas->restore(); in render()
421 void SkDrawPaintCommand::execute(SkCanvas* canvas) const { in execute()
422 canvas->drawPaint(fPaint); in execute()
425 bool SkDrawPaintCommand::render(SkCanvas* canvas) const { in render()
426 canvas->clear(0xFFFFFFFF); in render()
427 canvas->drawPaint(fPaint); in render()
440 void SkDrawPathCommand::execute(SkCanvas* canvas) const { in execute()
441 canvas->drawPath(fPath, fPaint); in execute()
444 bool SkDrawPathCommand::render(SkCanvas* canvas) const { in render()
445 render_path(canvas, fPath); in render()
473 void SkBeginDrawPictureCommand::execute(SkCanvas* canvas) const { in execute()
479 canvas->saveLayer(&bounds, fPaint.get()); in execute()
484 canvas->save(); in execute()
486 canvas->concat(*fMatrix.get()); in execute()
490 bool SkBeginDrawPictureCommand::render(SkCanvas* canvas) const { in render()
491 canvas->clear(0xFFFFFFFF); in render()
492 canvas->save(); in render()
494 xlate_and_scale_to_bounds(canvas, fPicture->cullRect()); in render()
496 canvas->drawPicture(fPicture.get()); in render()
498 canvas->restore(); in render()
506 void SkEndDrawPictureCommand::execute(SkCanvas* canvas) const { in execute()
508 canvas->restore(); in execute()
528 void SkDrawPointsCommand::execute(SkCanvas* canvas) const { in execute()
529 canvas->drawPoints(fMode, fCount, fPts, fPaint); in execute()
532 bool SkDrawPointsCommand::render(SkCanvas* canvas) const { in render()
533 canvas->clear(0xFFFFFFFF); in render()
534 canvas->save(); in render()
543 xlate_and_scale_to_bounds(canvas, bounds); in render()
549 canvas->drawPoints(fMode, fCount, fPts, p); in render()
550 canvas->restore(); in render()
575 void SkDrawPosTextCommand::execute(SkCanvas* canvas) const { in execute()
576 canvas->drawPosText(fText, fByteLength, fPos, fPaint); in execute()
602 void SkDrawPosTextHCommand::execute(SkCanvas* canvas) const { in execute()
603 canvas->drawPosTextH(fText, fByteLength, fXpos, fConstY, fPaint); in execute()
623 void SkDrawTextBlobCommand::execute(SkCanvas* canvas) const { in execute()
624 canvas->drawTextBlob(fBlob, fXPos, fYPos, fPaint); in execute()
627 bool SkDrawTextBlobCommand::render(SkCanvas* canvas) const { in render()
628 canvas->clear(SK_ColorWHITE); in render()
629 canvas->save(); in render()
632 xlate_and_scale_to_bounds(canvas, bounds); in render()
634 canvas->drawTextBlob(fBlob.get(), fXPos, fYPos, fPaint); in render()
636 canvas->restore(); in render()
654 void SkDrawPatchCommand::execute(SkCanvas* canvas) const { in execute()
655 canvas->drawPatch(fCubics, fColors, fTexCoords, fXfermode, fPaint); in execute()
667 void SkDrawRectCommand::execute(SkCanvas* canvas) const { in execute()
668 canvas->drawRect(fRect, fPaint); in execute()
680 void SkDrawRRectCommand::execute(SkCanvas* canvas) const { in execute()
681 canvas->drawRRect(fRRect, fPaint); in execute()
684 bool SkDrawRRectCommand::render(SkCanvas* canvas) const { in render()
685 render_rrect(canvas, fRRect); in render()
702 void SkDrawDRRectCommand::execute(SkCanvas* canvas) const { in execute()
703 canvas->drawDRRect(fOuter, fInner, fPaint); in execute()
706 bool SkDrawDRRectCommand::render(SkCanvas* canvas) const { in render()
707 render_drrect(canvas, fOuter, fInner); in render()
732 void SkDrawSpriteCommand::execute(SkCanvas* canvas) const { in execute()
733 canvas->drawSprite(fBitmap, fLeft, fTop, fPaintPtr); in execute()
736 bool SkDrawSpriteCommand::render(SkCanvas* canvas) const { in render()
737 render_bitmap(canvas, fBitmap); in render()
757 void SkDrawTextCommand::execute(SkCanvas* canvas) const { in execute()
758 canvas->drawText(fText, fByteLength, fX, fY, fPaint); in execute()
784 void SkDrawTextOnPathCommand::execute(SkCanvas* canvas) const { in execute()
785 canvas->drawTextOnPath(fText, fByteLength, fPath, in execute()
845 void SkDrawVerticesCommand::execute(SkCanvas* canvas) const { in execute()
846 canvas->drawVertices(fVmode, fVertexCount, fVertices, in execute()
856 void SkRestoreCommand::execute(SkCanvas* canvas) const { in execute()
857 canvas->restore(); in execute()
864 void SkSaveCommand::execute(SkCanvas* canvas) const { in execute()
865 canvas->save(); in execute()
894 void SkSaveLayerCommand::execute(SkCanvas* canvas) const { in execute()
895 canvas->saveLayer(fBounds.isEmpty() ? NULL : &fBounds, in execute()
900 void SkSaveLayerCommand::vizExecute(SkCanvas* canvas) const { in vizExecute()
901 canvas->save(); in vizExecute()
916 void SkSetMatrixCommand::execute(SkCanvas* canvas) const { in execute()
918 canvas->setMatrix(temp); in execute()