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 #ifndef SkGpuDevice_DEFINED | 9 #ifndef SkGpuDevice_DEFINED |
10 #define SkGpuDevice_DEFINED | 10 #define SkGpuDevice_DEFINED |
11 | 11 |
12 #include "SkGr.h" | 12 #include "SkGr.h" |
13 #include "SkBitmap.h" | 13 #include "SkBitmap.h" |
14 #include "SkDevice.h" | 14 #include "SkDevice.h" |
15 #include "SkPicture.h" | 15 #include "SkPicture.h" |
16 #include "SkRegion.h" | 16 #include "SkRegion.h" |
17 #include "SkSurface.h" | 17 #include "SkSurface.h" |
18 #include "GrContext.h" | 18 #include "GrContext.h" |
19 #include "GrSurfacePriv.h" | 19 #include "GrSurfacePriv.h" |
20 | 20 |
21 struct SkDrawProcs; | |
22 struct GrSkDrawProcs; | |
23 | |
24 class GrAccelData; | 21 class GrAccelData; |
25 class GrTextureProducer; | 22 class GrTextureProducer; |
26 struct GrCachedLayer; | 23 struct GrCachedLayer; |
27 | 24 |
28 /** | 25 /** |
29 * Subclass of SkBaseDevice, which directs all drawing to the GrGpu owned by th
e | 26 * Subclass of SkBaseDevice, which directs all drawing to the GrGpu owned by th
e |
30 * canvas. | 27 * canvas. |
31 */ | 28 */ |
32 class SK_API SkGpuDevice : public SkBaseDevice { | 29 class SK_API SkGpuDevice : public SkBaseDevice { |
33 public: | 30 public: |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 bool onReadPixels(const SkImageInfo&, void*, size_t, int, int) override; | 144 bool onReadPixels(const SkImageInfo&, void*, size_t, int, int) override; |
148 bool onWritePixels(const SkImageInfo&, const void*, size_t, int, int) overri
de; | 145 bool onWritePixels(const SkImageInfo&, const void*, size_t, int, int) overri
de; |
149 bool onShouldDisableLCD(const SkPaint&) const final; | 146 bool onShouldDisableLCD(const SkPaint&) const final; |
150 | 147 |
151 /** PRIVATE / EXPERIMENTAL -- do not call */ | 148 /** PRIVATE / EXPERIMENTAL -- do not call */ |
152 virtual bool EXPERIMENTAL_drawPicture(SkCanvas* canvas, const SkPicture* pic
ture, | 149 virtual bool EXPERIMENTAL_drawPicture(SkCanvas* canvas, const SkPicture* pic
ture, |
153 const SkMatrix*, const SkPaint*) overr
ide; | 150 const SkMatrix*, const SkPaint*) overr
ide; |
154 | 151 |
155 private: | 152 private: |
156 GrContext* fContext; | 153 GrContext* fContext; |
157 GrSkDrawProcs* fDrawProcs; | |
158 SkAutoTUnref<const SkClipStack> fClipStack; | 154 SkAutoTUnref<const SkClipStack> fClipStack; |
159 SkIPoint fClipOrigin; | 155 SkIPoint fClipOrigin; |
160 GrClip fClip; | 156 GrClip fClip; |
161 SkAutoTUnref<GrDrawContext> fDrawContext; | 157 SkAutoTUnref<GrDrawContext> fDrawContext; |
162 GrRenderTarget* fRenderTarget; | 158 GrRenderTarget* fRenderTarget; |
163 // remove when our clients don't rely on accessBitmap() | 159 // remove when our clients don't rely on accessBitmap() |
164 SkBitmap fLegacyBitmap; | 160 SkBitmap fLegacyBitmap; |
165 bool fNeedClear; | 161 bool fNeedClear; |
166 bool fOpaque; | 162 bool fOpaque; |
167 | 163 |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 | 250 |
255 static GrRenderTarget* CreateRenderTarget(GrContext*, SkSurface::Budgeted, c
onst SkImageInfo&, | 251 static GrRenderTarget* CreateRenderTarget(GrContext*, SkSurface::Budgeted, c
onst SkImageInfo&, |
256 int sampleCount); | 252 int sampleCount); |
257 | 253 |
258 friend class GrAtlasTextContext; | 254 friend class GrAtlasTextContext; |
259 friend class SkSurface_Gpu; // for access to surfaceProps | 255 friend class SkSurface_Gpu; // for access to surfaceProps |
260 typedef SkBaseDevice INHERITED; | 256 typedef SkBaseDevice INHERITED; |
261 }; | 257 }; |
262 | 258 |
263 #endif | 259 #endif |
OLD | NEW |