OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2010 Google Inc. | 2 * Copyright 2010 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef SkGpuDevice_DEFINED | 8 #ifndef SkGpuDevice_DEFINED |
9 #define SkGpuDevice_DEFINED | 9 #define SkGpuDevice_DEFINED |
10 | 10 |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 enum Flags { | 143 enum Flags { |
144 kNeedClear_Flag = 1 << 0, //!< Surface requires an initial clear | 144 kNeedClear_Flag = 1 << 0, //!< Surface requires an initial clear |
145 kIsOpaque_Flag = 1 << 1, //!< Hint from client that rendering to this
device will be | 145 kIsOpaque_Flag = 1 << 1, //!< Hint from client that rendering to this
device will be |
146 // opaque even if the config supports alpha
. | 146 // opaque even if the config supports alpha
. |
147 }; | 147 }; |
148 static bool CheckAlphaTypeAndGetFlags(const SkImageInfo* info, InitContents
init, | 148 static bool CheckAlphaTypeAndGetFlags(const SkImageInfo* info, InitContents
init, |
149 unsigned* flags); | 149 unsigned* flags); |
150 | 150 |
151 SkGpuDevice(sk_sp<GrDrawContext>, int width, int height, unsigned flags); | 151 SkGpuDevice(sk_sp<GrDrawContext>, int width, int height, unsigned flags); |
152 | 152 |
153 SkBaseDevice* onCreateDevice(const CreateInfo&, const SkPaint*) override; | 153 SkBaseDevice* onCreateDevice(const CreateInfo&, const SkPaint*, |
| 154 SkRasterCanvasLayerAllocator*) override; |
154 | 155 |
155 sk_sp<SkSurface> makeSurface(const SkImageInfo&, const SkSurfaceProps&) over
ride; | 156 sk_sp<SkSurface> makeSurface(const SkImageInfo&, const SkSurfaceProps&) over
ride; |
156 | 157 |
157 SkImageFilterCache* getImageFilterCache() override; | 158 SkImageFilterCache* getImageFilterCache() override; |
158 | 159 |
159 bool forceConservativeRasterClip() const override { return true; } | 160 bool forceConservativeRasterClip() const override { return true; } |
160 | 161 |
161 // sets the render target and clip on context | 162 // sets the render target and clip on context |
162 void prepareDraw(const SkDraw&); | 163 void prepareDraw(const SkDraw&); |
163 | 164 |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 int sampleCount, | 246 int sampleCount, |
246 GrSurfaceOrigin, | 247 GrSurfaceOrigin, |
247 const SkSurfaceProps*); | 248 const SkSurfaceProps*); |
248 | 249 |
249 friend class GrAtlasTextContext; | 250 friend class GrAtlasTextContext; |
250 friend class SkSurface_Gpu; // for access to surfaceProps | 251 friend class SkSurface_Gpu; // for access to surfaceProps |
251 typedef SkBaseDevice INHERITED; | 252 typedef SkBaseDevice INHERITED; |
252 }; | 253 }; |
253 | 254 |
254 #endif | 255 #endif |
OLD | NEW |