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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 */ | 45 */ |
46 static SkGpuDevice* Create(GrRenderTarget* target, int width, int height, | 46 static SkGpuDevice* Create(GrRenderTarget* target, int width, int height, |
47 const SkSurfaceProps*, InitContents); | 47 const SkSurfaceProps*, InitContents); |
48 | 48 |
49 /** | 49 /** |
50 * New device that will create an offscreen renderTarget based on the ImageI
nfo and | 50 * New device that will create an offscreen renderTarget based on the ImageI
nfo and |
51 * sampleCount. The Budgeted param controls whether the device's backing sto
re counts against | 51 * sampleCount. The Budgeted param controls whether the device's backing sto
re counts against |
52 * the resource cache budget. On failure, returns nullptr. | 52 * the resource cache budget. On failure, returns nullptr. |
53 */ | 53 */ |
54 static SkGpuDevice* Create(GrContext*, SkBudgeted, const SkImageInfo&, | 54 static SkGpuDevice* Create(GrContext*, SkBudgeted, const SkImageInfo&, |
55 int sampleCount, const SkSurfaceProps*, | 55 int sampleCount, const SkSurfaceProps*, InitConte
nts); |
56 InitContents, GrTextureStorageAllocator = GrTextu
reStorageAllocator()); | |
57 | 56 |
58 ~SkGpuDevice() override {} | 57 ~SkGpuDevice() override {} |
59 | 58 |
60 SkGpuDevice* cloneDevice(const SkSurfaceProps& props) { | 59 SkGpuDevice* cloneDevice(const SkSurfaceProps& props) { |
61 SkBaseDevice* dev = this->onCreateDevice(CreateInfo(this->imageInfo(), k
Possible_TileUsage, | 60 SkBaseDevice* dev = this->onCreateDevice(CreateInfo(this->imageInfo(), k
Possible_TileUsage, |
62 props.pixelGeometry(
)), | 61 props.pixelGeometry(
)), |
63 nullptr); | 62 nullptr); |
64 return static_cast<SkGpuDevice*>(dev); | 63 return static_cast<SkGpuDevice*>(dev); |
65 } | 64 } |
66 | 65 |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 | 251 |
253 bool drawFilledDRRect(const SkMatrix& viewMatrix, const SkRRect& outer, | 252 bool drawFilledDRRect(const SkMatrix& viewMatrix, const SkRRect& outer, |
254 const SkRRect& inner, const SkPaint& paint); | 253 const SkRRect& inner, const SkPaint& paint); |
255 | 254 |
256 void drawProducerNine(const SkDraw&, GrTextureProducer*, const SkIRect& cent
er, | 255 void drawProducerNine(const SkDraw&, GrTextureProducer*, const SkIRect& cent
er, |
257 const SkRect& dst, const SkPaint&); | 256 const SkRect& dst, const SkPaint&); |
258 | 257 |
259 bool drawDashLine(const SkPoint pts[2], const SkPaint& paint); | 258 bool drawDashLine(const SkPoint pts[2], const SkPaint& paint); |
260 | 259 |
261 static GrRenderTarget* CreateRenderTarget(GrContext*, SkBudgeted, const SkIm
ageInfo&, | 260 static GrRenderTarget* CreateRenderTarget(GrContext*, SkBudgeted, const SkIm
ageInfo&, |
262 int sampleCount, GrTextureStorageA
llocator); | 261 int sampleCount); |
263 | 262 |
264 void drawSpriteWithFilter(const SkDraw&, const SkBitmap&, int x, int y, | 263 void drawSpriteWithFilter(const SkDraw&, const SkBitmap&, int x, int y, |
265 const SkPaint&) override; | 264 const SkPaint&) override; |
266 | 265 |
267 friend class GrAtlasTextContext; | 266 friend class GrAtlasTextContext; |
268 friend class SkSurface_Gpu; // for access to surfaceProps | 267 friend class SkSurface_Gpu; // for access to surfaceProps |
269 typedef SkBaseDevice INHERITED; | 268 typedef SkBaseDevice INHERITED; |
270 }; | 269 }; |
271 | 270 |
272 #endif | 271 #endif |
OLD | NEW |