Home | History | Annotate | Download | only in gm

Lines Matching full:canvas

37 static void draw_hair(SkCanvas* canvas, const SkPaint& paint) {
40 canvas->drawLine(0, 0, W, H, p);
43 static void draw_thick(SkCanvas* canvas, const SkPaint& paint) {
46 canvas->drawLine(0, 0, W, H, p);
49 static void draw_rect(SkCanvas* canvas, const SkPaint& paint) {
50 canvas->drawRect(SkRect::MakeWH(W, H), paint);
53 static void draw_oval(SkCanvas* canvas, const SkPaint& paint) {
54 canvas->drawOval(SkRect::MakeWH(W, H), paint);
57 static void draw_text(SkCanvas* canvas, const SkPaint& paint) {
60 canvas->drawText("Hamburge", 8, 0, H*2/3, p);
79 void drawContent(SkCanvas* canvas) {
80 canvas->translate(SkIntToScalar(20), SkIntToScalar(20));
100 canvas->save();
105 canvas->save();
107 procs[y](canvas, paint);
108 canvas->translate(0, H * 5 / 4);
110 canvas->restore();
111 canvas->translate(W * 5 / 4, 0);
114 canvas->restore();
115 canvas->translate(0, (H * 5 / 4) * SK_ARRAY_COUNT(procs));
119 static SkSurface* compat_surface(SkCanvas* canvas, const SkISize& size, bool skipGPU) {
124 if (canvas->getGrContext() && skipGPU) {
128 SkSurface* surface = callNewSurface ? canvas->newSurface(info) : NULL;
130 // picture canvas will return null, so fall-back to raster
136 virtual void onDraw(SkCanvas* canvas) {
137 SkAutoTUnref<SkSurface> surf(compat_surface(canvas, this->getISize(),
141 surf->draw(canvas, 0, 0, NULL);