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 #include "GrTextContext.h" |
19 | 20 |
20 struct SkDrawProcs; | 21 struct SkDrawProcs; |
21 struct GrSkDrawProcs; | 22 struct GrSkDrawProcs; |
22 class GrTextContext; | |
23 | 23 |
24 /** | 24 /** |
25 * Subclass of SkBitmapDevice, which directs all drawing to the GrGpu owned by
the | 25 * Subclass of SkBitmapDevice, which directs all drawing to the GrGpu owned by
the |
26 * canvas. | 26 * canvas. |
27 */ | 27 */ |
28 class SK_API SkGpuDevice : public SkBitmapDevice { | 28 class SK_API SkGpuDevice : public SkBitmapDevice { |
29 public: | 29 public: |
30 | 30 |
31 /** | 31 /** |
32 * Creates an SkGpuDevice from a GrSurface. This will fail if the surface is
not a render | 32 * 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... |
142 int x, int y, | 142 int x, int y, |
143 SkCanvas::Config8888 config8888) SK_OVERRIDE; | 143 SkCanvas::Config8888 config8888) SK_OVERRIDE; |
144 | 144 |
145 private: | 145 private: |
146 GrContext* fContext; | 146 GrContext* fContext; |
147 | 147 |
148 GrSkDrawProcs* fDrawProcs; | 148 GrSkDrawProcs* fDrawProcs; |
149 | 149 |
150 GrClipData fClipData; | 150 GrClipData fClipData; |
151 | 151 |
| 152 GrTextContextFactory* fTextContextFactory; |
| 153 |
152 // state for our render-target | 154 // state for our render-target |
153 GrRenderTarget* fRenderTarget; | 155 GrRenderTarget* fRenderTarget; |
154 bool fNeedClear; | 156 bool fNeedClear; |
155 | 157 |
156 // called from rt and tex cons | 158 // called from rt and tex cons |
157 void initFromRenderTarget(GrContext*, GrRenderTarget*, bool cached); | 159 void initFromRenderTarget(GrContext*, GrRenderTarget*, bool cached); |
158 | 160 |
159 // used by createCompatibleDevice | 161 // used by createCompatibleDevice |
160 SkGpuDevice(GrContext*, GrTexture* texture, bool needClear); | 162 SkGpuDevice(GrContext*, GrTexture* texture, bool needClear); |
161 | 163 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 | 212 |
211 /** | 213 /** |
212 * Returns non-initialized instance. | 214 * Returns non-initialized instance. |
213 */ | 215 */ |
214 GrTextContext* getTextContext(); | 216 GrTextContext* getTextContext(); |
215 | 217 |
216 typedef SkBitmapDevice INHERITED; | 218 typedef SkBitmapDevice INHERITED; |
217 }; | 219 }; |
218 | 220 |
219 #endif | 221 #endif |
OLD | NEW |