| 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 "SkRegion.h" | 17 #include "SkRegion.h" |
| 18 #include "GrContext.h" | 18 #include "GrContext.h" |
| 19 | 19 |
| 20 struct SkDrawProcs; | 20 struct SkDrawProcs; |
| 21 struct GrSkDrawProcs; | 21 struct GrSkDrawProcs; |
| 22 | 22 |
| 23 class GrTextContextManager; | 23 class GrTextContext; |
| 24 | 24 |
| 25 /** | 25 /** |
| 26 * Subclass of SkBitmapDevice, which directs all drawing to the GrGpu owned by
the | 26 * Subclass of SkBitmapDevice, which directs all drawing to the GrGpu owned by
the |
| 27 * canvas. | 27 * canvas. |
| 28 */ | 28 */ |
| 29 class SK_API SkGpuDevice : public SkBitmapDevice { | 29 class SK_API SkGpuDevice : public SkBitmapDevice { |
| 30 public: | 30 public: |
| 31 | 31 |
| 32 /** | 32 /** |
| 33 * Creates an SkGpuDevice from a GrSurface. This will fail if the surface is
not a render | 33 * Creates an SkGpuDevice from a GrSurface. This will fail if the surface is
not a render |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 int x, int y, | 143 int x, int y, |
| 144 SkCanvas::Config8888 config8888) SK_OVERRIDE; | 144 SkCanvas::Config8888 config8888) SK_OVERRIDE; |
| 145 | 145 |
| 146 private: | 146 private: |
| 147 GrContext* fContext; | 147 GrContext* fContext; |
| 148 | 148 |
| 149 GrSkDrawProcs* fDrawProcs; | 149 GrSkDrawProcs* fDrawProcs; |
| 150 | 150 |
| 151 GrClipData fClipData; | 151 GrClipData fClipData; |
| 152 | 152 |
| 153 GrTextContextManager* fTextContextManager; | 153 GrTextContext* fMainTextContext; |
| 154 GrTextContext* fFallbackTextContext; |
| 154 | 155 |
| 155 // state for our render-target | 156 // state for our render-target |
| 156 GrRenderTarget* fRenderTarget; | 157 GrRenderTarget* fRenderTarget; |
| 157 bool fNeedClear; | 158 bool fNeedClear; |
| 158 | 159 |
| 159 // called from rt and tex cons | 160 // called from rt and tex cons |
| 160 void initFromRenderTarget(GrContext*, GrRenderTarget*, bool cached); | 161 void initFromRenderTarget(GrContext*, GrRenderTarget*, bool cached); |
| 161 | 162 |
| 162 // used by createCompatibleDevice | 163 // used by createCompatibleDevice |
| 163 SkGpuDevice(GrContext*, GrTexture* texture, bool needClear); | 164 SkGpuDevice(GrContext*, GrTexture* texture, bool needClear); |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 const GrTextureParams& params, | 207 const GrTextureParams& params, |
| 207 const SkPaint& paint, | 208 const SkPaint& paint, |
| 208 SkCanvas::DrawBitmapRectFlags flags, | 209 SkCanvas::DrawBitmapRectFlags flags, |
| 209 int tileSize, | 210 int tileSize, |
| 210 bool bicubic); | 211 bool bicubic); |
| 211 | 212 |
| 212 typedef SkBitmapDevice INHERITED; | 213 typedef SkBitmapDevice INHERITED; |
| 213 }; | 214 }; |
| 214 | 215 |
| 215 #endif | 216 #endif |
| OLD | NEW |