| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2010 Google Inc. | 3 * Copyright 2010 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 | 9 |
| 10 | 10 |
| 11 #ifndef SkGpuDevice_DEFINED | 11 #ifndef SkGpuDevice_DEFINED |
| 12 #define SkGpuDevice_DEFINED | 12 #define SkGpuDevice_DEFINED |
| 13 | 13 |
| 14 #include "SkGr.h" | 14 #include "SkGr.h" |
| 15 #include "SkBitmap.h" | 15 #include "SkBitmap.h" |
| 16 #include "SkBitmapDevice.h" | 16 #include "SkBitmapDevice.h" |
| 17 #include "SkPicture.h" |
| 17 #include "SkRegion.h" | 18 #include "SkRegion.h" |
| 18 #include "GrContext.h" | 19 #include "GrContext.h" |
| 19 | 20 |
| 20 struct SkDrawProcs; | 21 struct SkDrawProcs; |
| 21 struct GrSkDrawProcs; | 22 struct GrSkDrawProcs; |
| 22 | 23 |
| 23 class GrTextContext; | 24 class GrTextContext; |
| 24 | 25 |
| 25 /** | 26 /** |
| 26 * Subclass of SkBitmapDevice, which directs all drawing to the GrGpu owned by
the | 27 * Subclass of SkBitmapDevice, which directs all drawing to the GrGpu owned by
the |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 /** | 140 /** |
| 140 * Make's this device's rendertarget current in the underlying 3D API. | 141 * Make's this device's rendertarget current in the underlying 3D API. |
| 141 * Also implicitly flushes. | 142 * Also implicitly flushes. |
| 142 */ | 143 */ |
| 143 virtual void makeRenderTargetCurrent(); | 144 virtual void makeRenderTargetCurrent(); |
| 144 | 145 |
| 145 virtual bool canHandleImageFilter(const SkImageFilter*) SK_OVERRIDE; | 146 virtual bool canHandleImageFilter(const SkImageFilter*) SK_OVERRIDE; |
| 146 virtual bool filterImage(const SkImageFilter*, const SkBitmap&, const SkMatr
ix&, | 147 virtual bool filterImage(const SkImageFilter*, const SkBitmap&, const SkMatr
ix&, |
| 147 SkBitmap*, SkIPoint*) SK_OVERRIDE; | 148 SkBitmap*, SkIPoint*) SK_OVERRIDE; |
| 148 | 149 |
| 150 /** PRIVATE / EXPERIMENTAL -- do not call */ |
| 151 virtual void EXPERIMENTAL_optimize(SkPicture* picture) SK_OVERRIDE; |
| 152 /** PRIVATE / EXPERIMENTAL -- do not call */ |
| 153 virtual bool EXPERIMENTAL_optimizedRender(SkPicture& picture) SK_OVERRIDE; |
| 154 |
| 149 class SkAutoCachedTexture; // used internally | 155 class SkAutoCachedTexture; // used internally |
| 150 | 156 |
| 157 |
| 151 protected: | 158 protected: |
| 152 virtual bool onReadPixels(const SkBitmap&, int x, int y, SkCanvas::Config888
8) SK_OVERRIDE; | 159 virtual bool onReadPixels(const SkBitmap&, int x, int y, SkCanvas::Config888
8) SK_OVERRIDE; |
| 153 virtual bool onWritePixels(const SkImageInfo&, const void*, size_t, int, int
) SK_OVERRIDE; | 160 virtual bool onWritePixels(const SkImageInfo&, const void*, size_t, int, int
) SK_OVERRIDE; |
| 154 | 161 |
| 155 private: | 162 private: |
| 156 GrContext* fContext; | 163 GrContext* fContext; |
| 157 | 164 |
| 158 GrSkDrawProcs* fDrawProcs; | 165 GrSkDrawProcs* fDrawProcs; |
| 159 | 166 |
| 160 GrClipData fClipData; | 167 GrClipData fClipData; |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 bool bicubic); | 217 bool bicubic); |
| 211 void drawTiledBitmap(const SkBitmap& bitmap, | 218 void drawTiledBitmap(const SkBitmap& bitmap, |
| 212 const SkRect& srcRect, | 219 const SkRect& srcRect, |
| 213 const SkIRect& clippedSrcRect, | 220 const SkIRect& clippedSrcRect, |
| 214 const GrTextureParams& params, | 221 const GrTextureParams& params, |
| 215 const SkPaint& paint, | 222 const SkPaint& paint, |
| 216 SkCanvas::DrawBitmapRectFlags flags, | 223 SkCanvas::DrawBitmapRectFlags flags, |
| 217 int tileSize, | 224 int tileSize, |
| 218 bool bicubic); | 225 bool bicubic); |
| 219 | 226 |
| 227 static SkPicture::SkAccelData::Key ComputeAccelDataKey(); |
| 228 |
| 220 typedef SkBitmapDevice INHERITED; | 229 typedef SkBitmapDevice INHERITED; |
| 221 }; | 230 }; |
| 222 | 231 |
| 223 #endif | 232 #endif |
| OLD | NEW |