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 virtual void makeRenderTargetCurrent(); | 141 virtual void makeRenderTargetCurrent(); |
141 | 142 |
142 virtual bool canHandleImageFilter(const SkImageFilter*) SK_OVERRIDE; | 143 virtual bool canHandleImageFilter(const SkImageFilter*) SK_OVERRIDE; |
143 virtual bool filterImage(const SkImageFilter*, const SkBitmap&, | 144 virtual bool filterImage(const SkImageFilter*, const SkBitmap&, |
144 const SkImageFilter::Context&, | 145 const SkImageFilter::Context&, |
145 SkBitmap*, SkIPoint*) SK_OVERRIDE; | 146 SkBitmap*, SkIPoint*) SK_OVERRIDE; |
146 | 147 |
147 class SkAutoCachedTexture; // used internally | 148 class SkAutoCachedTexture; // used internally |
148 | 149 |
| 150 |
149 protected: | 151 protected: |
150 virtual bool onReadPixels(const SkBitmap&, int x, int y, SkCanvas::Config888
8) SK_OVERRIDE; | 152 virtual bool onReadPixels(const SkBitmap&, int x, int y, SkCanvas::Config888
8) SK_OVERRIDE; |
151 virtual bool onWritePixels(const SkImageInfo&, const void*, size_t, int, int
) SK_OVERRIDE; | 153 virtual bool onWritePixels(const SkImageInfo&, const void*, size_t, int, int
) SK_OVERRIDE; |
152 | 154 |
| 155 /** PRIVATE / EXPERIMENTAL -- do not call */ |
| 156 virtual void EXPERIMENTAL_optimize(SkPicture* picture) SK_OVERRIDE; |
| 157 /** PRIVATE / EXPERIMENTAL -- do not call */ |
| 158 virtual bool EXPERIMENTAL_drawPicture(const SkPicture& picture) SK_OVERRIDE; |
| 159 |
153 private: | 160 private: |
154 GrContext* fContext; | 161 GrContext* fContext; |
155 | 162 |
156 GrSkDrawProcs* fDrawProcs; | 163 GrSkDrawProcs* fDrawProcs; |
157 | 164 |
158 GrClipData fClipData; | 165 GrClipData fClipData; |
159 | 166 |
160 GrTextContext* fMainTextContext; | 167 GrTextContext* fMainTextContext; |
161 GrTextContext* fFallbackTextContext; | 168 GrTextContext* fFallbackTextContext; |
162 | 169 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 bool bicubic); | 215 bool bicubic); |
209 void drawTiledBitmap(const SkBitmap& bitmap, | 216 void drawTiledBitmap(const SkBitmap& bitmap, |
210 const SkRect& srcRect, | 217 const SkRect& srcRect, |
211 const SkIRect& clippedSrcRect, | 218 const SkIRect& clippedSrcRect, |
212 const GrTextureParams& params, | 219 const GrTextureParams& params, |
213 const SkPaint& paint, | 220 const SkPaint& paint, |
214 SkCanvas::DrawBitmapRectFlags flags, | 221 SkCanvas::DrawBitmapRectFlags flags, |
215 int tileSize, | 222 int tileSize, |
216 bool bicubic); | 223 bool bicubic); |
217 | 224 |
| 225 static SkPicture::AccelData::Key ComputeAccelDataKey(); |
| 226 |
218 typedef SkBitmapDevice INHERITED; | 227 typedef SkBitmapDevice INHERITED; |
219 }; | 228 }; |
220 | 229 |
221 #endif | 230 #endif |
OLD | NEW |