Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(359)

Side by Side Diff: include/core/SkCanvasSimplifier.h

Issue 24615006: rebaseline drawbitmap gms (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: remove expectation included by mistake in another cl Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 /*
2 * Copyright 2013 The Android Open Source Project
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8
9 #ifndef SkCanvasSimplifier_DEFINED
10 #define SkCanvasSimplifier_DEFINED
11
12 #include "SkCanvas.h"
13
14 class SkCanvasSimplifier : public SkCanvas {
reed1 2013/09/26 17:00:46 1. Some dox for what this class does 2. Does it ne
edisonn 2013/09/26 19:44:09 added a few lines of doc
15 public:
16 SK_DECLARE_INST_COUNT(SkCanvasSimplifier)
17
18 SkCanvasSimplifier();
19
20 /** Construct a canvas with the specified device to draw into.
21 @param device Specifies a device for the canvas to draw into.
22 */
23 explicit SkCanvasSimplifier(SkBaseDevice* device);
24
25 virtual ~SkCanvasSimplifier();
26
27 virtual int save(SaveFlags flags = kMatrixClip_SaveFlag);
28
29 virtual int saveLayer(const SkRect* bounds, const SkPaint* paint,
30 SaveFlags flags = kARGB_ClipLayer_SaveFlag);
31
32 virtual void restore();
33
34 virtual bool isDrawingToLayer() const;
35
36 virtual bool translate(SkScalar dx, SkScalar dy);
37
38 virtual bool scale(SkScalar sx, SkScalar sy);
39
40 virtual bool rotate(SkScalar degrees);
41
42 virtual bool skew(SkScalar sx, SkScalar sy);
43
44 virtual bool concat(const SkMatrix& matrix);
45
46 virtual void setMatrix(const SkMatrix& matrix);
47
48 virtual bool clipRect(const SkRect& rect,
49 SkRegion::Op op = SkRegion::kIntersect_Op,
50 bool doAntiAlias = false);
51
52 virtual bool clipRRect(const SkRRect& rrect,
53 SkRegion::Op op = SkRegion::kIntersect_Op,
54 bool doAntiAlias = false);
55
56 virtual bool clipPath(const SkPath& path,
57 SkRegion::Op op = SkRegion::kIntersect_Op,
58 bool doAntiAlias = false);
59
60 virtual bool clipRegion(const SkRegion& deviceRgn,
61 SkRegion::Op op = SkRegion::kIntersect_Op);
62
63 virtual void clear(SkColor);
64
65 virtual void drawPaint(const SkPaint& paint);
66
67 virtual void drawPoints(PointMode mode, size_t count, const SkPoint pts[],
68 const SkPaint& paint);
69
70 virtual void drawRect(const SkRect& rect, const SkPaint& paint);
71
72 virtual void drawOval(const SkRect& oval, const SkPaint&);
73
74 virtual void drawRRect(const SkRRect& rrect, const SkPaint& paint);
75
76 virtual void drawPath(const SkPath& path, const SkPaint& paint);
77
78 virtual void drawBitmap(const SkBitmap& bitmap, SkScalar left, SkScalar top,
79 const SkPaint* paint = NULL);
80
81 virtual void drawBitmapRectToRect(const SkBitmap& bitmap, const SkRect* src,
82 const SkRect& dst,
83 const SkPaint* paint = NULL,
84 DrawBitmapRectFlags flags = kNone_DrawBitm apRectFlag);
85
86 virtual void drawBitmapMatrix(const SkBitmap& bitmap, const SkMatrix& m,
87 const SkPaint* paint = NULL);
88
89 virtual void drawBitmapNine(const SkBitmap& bitmap, const SkIRect& center,
90 const SkRect& dst, const SkPaint* paint = NULL);
91
92 virtual void drawSprite(const SkBitmap& bitmap, int left, int top,
93 const SkPaint* paint = NULL);
94
95
96 virtual void drawText(const void* text, size_t byteLength, SkScalar x,
97 SkScalar y, const SkPaint& paint);
98
99 virtual void drawPosText(const void* text, size_t byteLength,
100 const SkPoint pos[], const SkPaint& paint);
101
102 virtual void drawPosTextH(const void* text, size_t byteLength,
103 const SkScalar xpos[], SkScalar constY,
104 const SkPaint& paint);
105
106 virtual void drawTextOnPath(const void* text, size_t byteLength,
107 const SkPath& path, const SkMatrix* matrix,
108 const SkPaint& paint);
109
110 virtual void drawPicture(SkPicture& picture);
111
112 virtual void drawVertices(VertexMode vmode, int vertexCount,
113 const SkPoint vertices[], const SkPoint texs[],
114 const SkColor colors[], SkXfermode* xmode,
115 const uint16_t indices[], int indexCount,
116 const SkPaint& paint);
117
118
119 virtual SkDrawFilter* setDrawFilter(SkDrawFilter* filter);
120
121
122 private:
123 typedef SkCanvas INHERITED;
124 };
125
126 #endif // SkCanvasSimplifier_DEFINED
OLDNEW
« no previous file with comments | « gyp/core.gypi ('k') | include/core/SkDocument.h » ('j') | include/core/SkDocument.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698