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 |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 kIsOpaque_Flag = 1 << 1, //!< Hint from client that rendering to this
device will be | 173 kIsOpaque_Flag = 1 << 1, //!< Hint from client that rendering to this
device will be |
174 // opaque even if the config supports alpha
. | 174 // opaque even if the config supports alpha
. |
175 }; | 175 }; |
176 static bool CheckAlphaTypeAndGetFlags(const SkImageInfo* info, InitContents
init, | 176 static bool CheckAlphaTypeAndGetFlags(const SkImageInfo* info, InitContents
init, |
177 unsigned* flags); | 177 unsigned* flags); |
178 | 178 |
179 SkGpuDevice(GrRenderTarget*, int width, int height, const SkSurfaceProps*, u
nsigned flags); | 179 SkGpuDevice(GrRenderTarget*, int width, int height, const SkSurfaceProps*, u
nsigned flags); |
180 | 180 |
181 SkBaseDevice* onCreateDevice(const CreateInfo&, const SkPaint*) override; | 181 SkBaseDevice* onCreateDevice(const CreateInfo&, const SkPaint*) override; |
182 | 182 |
183 SkSurface* newSurface(const SkImageInfo&, const SkSurfaceProps&) override; | 183 sk_sp<SkSurface> makeSurface(const SkImageInfo&, const SkSurfaceProps&) over
ride; |
184 | 184 |
185 SkImageFilter::Cache* getImageFilterCache() override; | 185 SkImageFilter::Cache* getImageFilterCache() override; |
186 | 186 |
187 bool forceConservativeRasterClip() const override { return true; } | 187 bool forceConservativeRasterClip() const override { return true; } |
188 | 188 |
189 // sets the render target and clip on context | 189 // sets the render target and clip on context |
190 void prepareDraw(const SkDraw&); | 190 void prepareDraw(const SkDraw&); |
191 | 191 |
192 /** | 192 /** |
193 * Helper functions called by drawBitmapCommon. By the time these are called
the SkDraw's | 193 * Helper functions called by drawBitmapCommon. By the time these are called
the SkDraw's |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 | 264 |
265 void drawBitmapAsSpriteWithImageFilter(const SkDraw&, const SkBitmap&, int x
, int y, | 265 void drawBitmapAsSpriteWithImageFilter(const SkDraw&, const SkBitmap&, int x
, int y, |
266 const SkPaint&) override; | 266 const SkPaint&) override; |
267 | 267 |
268 friend class GrAtlasTextContext; | 268 friend class GrAtlasTextContext; |
269 friend class SkSurface_Gpu; // for access to surfaceProps | 269 friend class SkSurface_Gpu; // for access to surfaceProps |
270 typedef SkBaseDevice INHERITED; | 270 typedef SkBaseDevice INHERITED; |
271 }; | 271 }; |
272 | 272 |
273 #endif | 273 #endif |
OLD | NEW |