| 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 | |
| 144 // for debugging purposes only | 133 // for debugging purposes only |
| 145 void drawTexture(GrTexture*, const SkRect& dst, const SkPaint&); | 134 void drawTexture(GrTexture*, const SkRect& dst, const SkPaint&); |
| 146 | 135 |
| 147 protected: | 136 protected: |
| 148 bool onReadPixels(const SkImageInfo&, void*, size_t, int, int) override; | 137 bool onReadPixels(const SkImageInfo&, void*, size_t, int, int) override; |
| 149 bool onWritePixels(const SkImageInfo&, const void*, size_t, int, int) overri
de; | 138 bool onWritePixels(const SkImageInfo&, const void*, size_t, int, int) overri
de; |
| 150 bool onShouldDisableLCD(const SkPaint&) const final; | 139 bool onShouldDisableLCD(const SkPaint&) const final; |
| 151 | 140 |
| 152 /** PRIVATE / EXPERIMENTAL -- do not call */ | 141 /** PRIVATE / EXPERIMENTAL -- do not call */ |
| 153 virtual bool EXPERIMENTAL_drawPicture(SkCanvas* canvas, const SkPicture* pic
ture, | 142 virtual bool EXPERIMENTAL_drawPicture(SkCanvas* canvas, const SkPicture* pic
ture, |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 | 251 |
| 263 void drawSpriteWithFilter(const SkDraw&, const SkBitmap&, int x, int y, | 252 void drawSpriteWithFilter(const SkDraw&, const SkBitmap&, int x, int y, |
| 264 const SkPaint&) override; | 253 const SkPaint&) override; |
| 265 | 254 |
| 266 friend class GrAtlasTextContext; | 255 friend class GrAtlasTextContext; |
| 267 friend class SkSurface_Gpu; // for access to surfaceProps | 256 friend class SkSurface_Gpu; // for access to surfaceProps |
| 268 typedef SkBaseDevice INHERITED; | 257 typedef SkBaseDevice INHERITED; |
| 269 }; | 258 }; |
| 270 | 259 |
| 271 #endif | 260 #endif |
| OLD | NEW |