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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 static sk_sp<SkBaseDevice> Make(sk_sp<GrDrawContext> drawContext, | 55 static sk_sp<SkBaseDevice> Make(sk_sp<GrDrawContext> drawContext, |
56 int width, int height, | 56 int width, int height, |
57 InitContents); | 57 InitContents); |
58 | 58 |
59 /** | 59 /** |
60 * New device that will create an offscreen renderTarget based on the ImageI
nfo and | 60 * New device that will create an offscreen renderTarget based on the ImageI
nfo and |
61 * sampleCount. The Budgeted param controls whether the device's backing sto
re counts against | 61 * sampleCount. The Budgeted param controls whether the device's backing sto
re counts against |
62 * the resource cache budget. On failure, returns nullptr. | 62 * the resource cache budget. On failure, returns nullptr. |
63 */ | 63 */ |
64 static sk_sp<SkGpuDevice> Make(GrContext*, SkBudgeted, const SkImageInfo&, | 64 static sk_sp<SkGpuDevice> Make(GrContext*, SkBudgeted, const SkImageInfo&, |
65 int sampleCount, const SkSurfaceProps*, InitC
ontents); | 65 int sampleCount, GrSurfaceOrigin, |
| 66 const SkSurfaceProps*, InitContents); |
66 | 67 |
67 ~SkGpuDevice() override {} | 68 ~SkGpuDevice() override {} |
68 | 69 |
69 SkGpuDevice* cloneDevice(const SkSurfaceProps& props) { | 70 SkGpuDevice* cloneDevice(const SkSurfaceProps& props) { |
70 SkBaseDevice* dev = this->onCreateDevice(CreateInfo(this->imageInfo(), k
Possible_TileUsage, | 71 SkBaseDevice* dev = this->onCreateDevice(CreateInfo(this->imageInfo(), k
Possible_TileUsage, |
71 props.pixelGeometry(
)), | 72 props.pixelGeometry(
)), |
72 nullptr); | 73 nullptr); |
73 return static_cast<SkGpuDevice*>(dev); | 74 return static_cast<SkGpuDevice*>(dev); |
74 } | 75 } |
75 | 76 |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 | 259 |
259 bool drawFilledDRRect(const SkMatrix& viewMatrix, const SkRRect& outer, | 260 bool drawFilledDRRect(const SkMatrix& viewMatrix, const SkRRect& outer, |
260 const SkRRect& inner, const SkPaint& paint); | 261 const SkRRect& inner, const SkPaint& paint); |
261 | 262 |
262 void drawProducerNine(const SkDraw&, GrTextureProducer*, const SkIRect& cent
er, | 263 void drawProducerNine(const SkDraw&, GrTextureProducer*, const SkIRect& cent
er, |
263 const SkRect& dst, const SkPaint&); | 264 const SkRect& dst, const SkPaint&); |
264 | 265 |
265 bool drawDashLine(const SkPoint pts[2], const SkPaint& paint); | 266 bool drawDashLine(const SkPoint pts[2], const SkPaint& paint); |
266 void drawStrokedLine(const SkPoint pts[2], const SkDraw&, const SkPaint&); | 267 void drawStrokedLine(const SkPoint pts[2], const SkDraw&, const SkPaint&); |
267 | 268 |
268 static sk_sp<GrDrawContext> CreateDrawContext(GrContext*, | 269 static sk_sp<GrDrawContext> MakeDrawContext(GrContext*, |
269 SkBudgeted, | 270 SkBudgeted, |
270 const SkImageInfo&, | 271 const SkImageInfo&, |
271 int sampleCount, | 272 int sampleCount, |
272 const SkSurfaceProps*); | 273 GrSurfaceOrigin, |
| 274 const SkSurfaceProps*); |
273 | 275 |
274 friend class GrAtlasTextContext; | 276 friend class GrAtlasTextContext; |
275 friend class SkSurface_Gpu; // for access to surfaceProps | 277 friend class SkSurface_Gpu; // for access to surfaceProps |
276 typedef SkBaseDevice INHERITED; | 278 typedef SkBaseDevice INHERITED; |
277 }; | 279 }; |
278 | 280 |
279 #endif | 281 #endif |
OLD | NEW |