OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2010 Google Inc. | 2 * Copyright 2010 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef SkGpuDevice_DEFINED | 8 #ifndef SkGpuDevice_DEFINED |
9 #define SkGpuDevice_DEFINED | 9 #define SkGpuDevice_DEFINED |
10 | 10 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 GrContext* context() const override { return fContext; } | 60 GrContext* context() const override { return fContext; } |
61 | 61 |
62 // set all pixels to 0 | 62 // set all pixels to 0 |
63 void clearAll(); | 63 void clearAll(); |
64 | 64 |
65 void replaceDrawContext(bool shouldRetainContent); | 65 void replaceDrawContext(bool shouldRetainContent); |
66 | 66 |
67 GrDrawContext* accessDrawContext() override; | 67 GrDrawContext* accessDrawContext() override; |
68 | 68 |
69 void drawPaint(const SkDraw&, const SkPaint& paint) override; | 69 void drawPaint(const SkDraw&, const SkPaint& paint) override; |
70 virtual void drawPoints(const SkDraw&, SkCanvas::PointMode mode, size_t coun
t, | 70 void drawPoints(const SkDraw&, SkCanvas::PointMode mode, size_t count, const
SkPoint[], |
71 const SkPoint[], const SkPaint& paint) override; | 71 const SkPaint& paint) override; |
72 virtual void drawRect(const SkDraw&, const SkRect& r, | 72 void drawRect(const SkDraw&, const SkRect& r, const SkPaint& paint) override
; |
73 const SkPaint& paint) override; | 73 void drawRRect(const SkDraw&, const SkRRect& r, const SkPaint& paint) overri
de; |
74 virtual void drawRRect(const SkDraw&, const SkRRect& r, | 74 void drawDRRect(const SkDraw& draw, const SkRRect& outer, const SkRRect& inn
er, |
75 const SkPaint& paint) override; | 75 const SkPaint& paint) override; |
76 virtual void drawDRRect(const SkDraw& draw, const SkRRect& outer, | 76 void drawOval(const SkDraw&, const SkRect& oval, const SkPaint& paint) overr
ide; |
77 const SkRRect& inner, const SkPaint& paint) override
; | 77 void drawArc(const SkDraw&, const SkRect& oval, SkScalar startAngle, SkScala
r sweepAngle, |
78 virtual void drawOval(const SkDraw&, const SkRect& oval, | 78 bool useCenter, const SkPaint& paint) override; |
79 const SkPaint& paint) override; | 79 void drawPath(const SkDraw&, const SkPath& path, const SkPaint& paint, |
80 virtual void drawArc(const SkDraw&, const SkRect& oval, SkScalar startAngle, | 80 const SkMatrix* prePathMatrix, bool pathIsMutable) override; |
81 SkScalar sweepAngle, bool useCenter, const SkPaint& pai
nt) override; | 81 void drawBitmap(const SkDraw&, const SkBitmap& bitmap, const SkMatrix&, |
82 virtual void drawPath(const SkDraw&, const SkPath& path, | 82 const SkPaint&) override; |
83 const SkPaint& paint, const SkMatrix* prePathMatrix, | 83 void drawBitmapRect(const SkDraw&, const SkBitmap&, const SkRect* srcOrNull,
const SkRect& dst, |
84 bool pathIsMutable) override; | 84 const SkPaint& paint, SkCanvas::SrcRectConstraint) overr
ide; |
85 virtual void drawBitmap(const SkDraw&, const SkBitmap& bitmap, | 85 void drawSprite(const SkDraw&, const SkBitmap& bitmap, int x, int y, |
86 const SkMatrix&, const SkPaint&) override; | 86 const SkPaint& paint) override; |
87 virtual void drawBitmapRect(const SkDraw&, const SkBitmap&, | 87 void drawText(const SkDraw&, const void* text, size_t len, SkScalar x, SkSca
lar y, |
88 const SkRect* srcOrNull, const SkRect& dst, | 88 const SkPaint&) override; |
89 const SkPaint& paint, SkCanvas::SrcRectConstrain
t) override; | 89 void drawPosText(const SkDraw&, const void* text, size_t len, const SkScalar
pos[], |
90 virtual void drawSprite(const SkDraw&, const SkBitmap& bitmap, | 90 int scalarsPerPos, const SkPoint& offset, const SkPaint&) o
verride; |
91 int x, int y, const SkPaint& paint) override; | 91 void drawTextBlob(const SkDraw&, const SkTextBlob*, SkScalar x, SkScalar y, |
92 virtual void drawText(const SkDraw&, const void* text, size_t len, | 92 const SkPaint& paint, SkDrawFilter* drawFilter) override; |
93 SkScalar x, SkScalar y, const SkPaint&) override; | 93 void drawVertices(const SkDraw&, SkCanvas::VertexMode, int vertexCount, cons
t SkPoint verts[], |
94 virtual void drawPosText(const SkDraw&, const void* text, size_t len, | 94 const SkPoint texs[], const SkColor colors[], SkXfermode*
xmode, |
95 const SkScalar pos[], int scalarsPerPos, | 95 const uint16_t indices[], int indexCount, const SkPaint&)
override; |
96 const SkPoint& offset, const SkPaint&) override; | |
97 virtual void drawTextBlob(const SkDraw&, const SkTextBlob*, SkScalar x, SkSc
alar y, | |
98 const SkPaint& paint, SkDrawFilter* drawFilter) ov
erride; | |
99 virtual void drawVertices(const SkDraw&, SkCanvas::VertexMode, int vertexCou
nt, | |
100 const SkPoint verts[], const SkPoint texs[], | |
101 const SkColor colors[], SkXfermode* xmode, | |
102 const uint16_t indices[], int indexCount, | |
103 const SkPaint&) override; | |
104 void drawAtlas(const SkDraw&, const SkImage* atlas, const SkRSXform[], const
SkRect[], | 96 void drawAtlas(const SkDraw&, const SkImage* atlas, const SkRSXform[], const
SkRect[], |
105 const SkColor[], int count, SkXfermode::Mode, const SkPai
nt&) override; | 97 const SkColor[], int count, SkXfermode::Mode, const SkPaint&)
override; |
106 void drawDevice(const SkDraw&, SkBaseDevice*, int x, int y, const SkPaint&)
override; | 98 void drawDevice(const SkDraw&, SkBaseDevice*, int x, int y, const SkPaint&)
override; |
107 | 99 |
108 void drawImage(const SkDraw&, const SkImage*, SkScalar x, SkScalar y, const
SkPaint&) override; | 100 void drawImage(const SkDraw&, const SkImage*, SkScalar x, SkScalar y, const
SkPaint&) override; |
109 void drawImageRect(const SkDraw&, const SkImage*, const SkRect* src, const S
kRect& dst, | 101 void drawImageRect(const SkDraw&, const SkImage*, const SkRect* src, const S
kRect& dst, |
110 const SkPaint&, SkCanvas::SrcRectConstraint) override; | 102 const SkPaint&, SkCanvas::SrcRectConstraint) override; |
111 | 103 |
112 void drawImageNine(const SkDraw& draw, const SkImage* image, const SkIRect&
center, | 104 void drawImageNine(const SkDraw& draw, const SkImage* image, const SkIRect&
center, |
113 const SkRect& dst, const SkPaint& paint) override; | 105 const SkRect& dst, const SkPaint& paint) override; |
114 void drawBitmapNine(const SkDraw& draw, const SkBitmap& bitmap, const SkIRec
t& center, | 106 void drawBitmapNine(const SkDraw& draw, const SkBitmap& bitmap, const SkIRec
t& center, |
115 const SkRect& dst, const SkPaint& paint) override; | 107 const SkRect& dst, const SkPaint& paint) override; |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 int sampleCount, | 244 int sampleCount, |
253 GrSurfaceOrigin, | 245 GrSurfaceOrigin, |
254 const SkSurfaceProps*); | 246 const SkSurfaceProps*); |
255 | 247 |
256 friend class GrAtlasTextContext; | 248 friend class GrAtlasTextContext; |
257 friend class SkSurface_Gpu; // for access to surfaceProps | 249 friend class SkSurface_Gpu; // for access to surfaceProps |
258 typedef SkBaseDevice INHERITED; | 250 typedef SkBaseDevice INHERITED; |
259 }; | 251 }; |
260 | 252 |
261 #endif | 253 #endif |
OLD | NEW |