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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 const SkRect& dst, const SkPaint& paint) override; | 123 const SkRect& dst, const SkPaint& paint) override; |
124 | 124 |
125 void flush() override; | 125 void flush() override; |
126 | 126 |
127 void onAttachToCanvas(SkCanvas* canvas) override; | 127 void onAttachToCanvas(SkCanvas* canvas) override; |
128 void onDetachFromCanvas() override; | 128 void onDetachFromCanvas() override; |
129 | 129 |
130 const SkBitmap& onAccessBitmap() override; | 130 const SkBitmap& onAccessBitmap() override; |
131 bool onAccessPixels(SkPixmap*) override; | 131 bool onAccessPixels(SkPixmap*) override; |
132 | 132 |
| 133 bool canHandleImageFilter(const SkImageFilter*) override; |
| 134 virtual bool filterImage(const SkImageFilter*, const SkBitmap&, |
| 135 const SkImageFilter::Context&, |
| 136 SkBitmap*, SkIPoint*) override; |
| 137 |
| 138 bool filterTexture(GrContext*, GrTexture*, int width, int height, const SkIm
ageFilter*, |
| 139 const SkImageFilter::Context&, |
| 140 SkBitmap* result, SkIPoint* offset); |
| 141 |
| 142 static SkImageFilter::Cache* NewImageFilterCache(); |
| 143 |
133 // for debugging purposes only | 144 // for debugging purposes only |
134 void drawTexture(GrTexture*, const SkRect& dst, const SkPaint&); | 145 void drawTexture(GrTexture*, const SkRect& dst, const SkPaint&); |
135 | 146 |
136 protected: | 147 protected: |
137 bool onReadPixels(const SkImageInfo&, void*, size_t, int, int) override; | 148 bool onReadPixels(const SkImageInfo&, void*, size_t, int, int) override; |
138 bool onWritePixels(const SkImageInfo&, const void*, size_t, int, int) overri
de; | 149 bool onWritePixels(const SkImageInfo&, const void*, size_t, int, int) overri
de; |
139 bool onShouldDisableLCD(const SkPaint&) const final; | 150 bool onShouldDisableLCD(const SkPaint&) const final; |
140 | 151 |
141 /** PRIVATE / EXPERIMENTAL -- do not call */ | 152 /** PRIVATE / EXPERIMENTAL -- do not call */ |
142 virtual bool EXPERIMENTAL_drawPicture(SkCanvas* canvas, const SkPicture* pic
ture, | 153 virtual bool EXPERIMENTAL_drawPicture(SkCanvas* canvas, const SkPicture* pic
ture, |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 | 262 |
252 void drawSpriteWithFilter(const SkDraw&, const SkBitmap&, int x, int y, | 263 void drawSpriteWithFilter(const SkDraw&, const SkBitmap&, int x, int y, |
253 const SkPaint&) override; | 264 const SkPaint&) override; |
254 | 265 |
255 friend class GrAtlasTextContext; | 266 friend class GrAtlasTextContext; |
256 friend class SkSurface_Gpu; // for access to surfaceProps | 267 friend class SkSurface_Gpu; // for access to surfaceProps |
257 typedef SkBaseDevice INHERITED; | 268 typedef SkBaseDevice INHERITED; |
258 }; | 269 }; |
259 | 270 |
260 #endif | 271 #endif |
OLD | NEW |