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 | 9 |
10 | 10 |
11 #ifndef SkGpuDevice_DEFINED | 11 #ifndef SkGpuDevice_DEFINED |
12 #define SkGpuDevice_DEFINED | 12 #define SkGpuDevice_DEFINED |
13 | 13 |
14 #include "SkGr.h" | 14 #include "SkGr.h" |
15 #include "SkBitmap.h" | 15 #include "SkBitmap.h" |
16 #include "SkDevice.h" | 16 #include "SkDevice.h" |
17 #include "SkPicture.h" | 17 #include "SkPicture.h" |
18 #include "SkRegion.h" | 18 #include "SkRegion.h" |
19 #include "GrContext.h" | 19 #include "GrContext.h" |
| 20 #include "GrSurfacePriv.h" |
20 | 21 |
21 struct SkDrawProcs; | 22 struct SkDrawProcs; |
22 struct GrSkDrawProcs; | 23 struct GrSkDrawProcs; |
23 | 24 |
24 class GrAccelData; | 25 class GrAccelData; |
25 struct GrCachedLayer; | 26 struct GrCachedLayer; |
26 class GrTextContext; | 27 class GrTextContext; |
27 | 28 |
28 /** | 29 /** |
29 * Subclass of SkBaseDevice, which directs all drawing to the GrGpu owned by th
e | 30 * Subclass of SkBaseDevice, which directs all drawing to the GrGpu owned by th
e |
(...skipping 24 matching lines...) Expand all Loading... |
54 static SkGpuDevice* Create(GrContext*, const SkImageInfo&, const SkSurfacePr
ops&, | 55 static SkGpuDevice* Create(GrContext*, const SkImageInfo&, const SkSurfacePr
ops&, |
55 int sampleCount); | 56 int sampleCount); |
56 | 57 |
57 virtual ~SkGpuDevice(); | 58 virtual ~SkGpuDevice(); |
58 | 59 |
59 GrContext* context() const { return fContext; } | 60 GrContext* context() const { return fContext; } |
60 | 61 |
61 virtual GrRenderTarget* accessRenderTarget() SK_OVERRIDE; | 62 virtual GrRenderTarget* accessRenderTarget() SK_OVERRIDE; |
62 | 63 |
63 virtual SkImageInfo imageInfo() const SK_OVERRIDE { | 64 virtual SkImageInfo imageInfo() const SK_OVERRIDE { |
64 return fRenderTarget ? fRenderTarget->info() : SkImageInfo::MakeUnknown(
); | 65 return fRenderTarget ? fRenderTarget->surfacePriv().info() : SkImageInfo
::MakeUnknown(); |
65 } | 66 } |
66 | 67 |
67 virtual void clear(SkColor color) SK_OVERRIDE; | 68 virtual void clear(SkColor color) SK_OVERRIDE; |
68 virtual void drawPaint(const SkDraw&, const SkPaint& paint) SK_OVERRIDE; | 69 virtual void drawPaint(const SkDraw&, const SkPaint& paint) SK_OVERRIDE; |
69 virtual void drawPoints(const SkDraw&, SkCanvas::PointMode mode, size_t coun
t, | 70 virtual void drawPoints(const SkDraw&, SkCanvas::PointMode mode, size_t coun
t, |
70 const SkPoint[], const SkPaint& paint) SK_OVERRIDE; | 71 const SkPoint[], const SkPaint& paint) SK_OVERRIDE; |
71 virtual void drawRect(const SkDraw&, const SkRect& r, | 72 virtual void drawRect(const SkDraw&, const SkRect& r, |
72 const SkPaint& paint) SK_OVERRIDE; | 73 const SkPaint& paint) SK_OVERRIDE; |
73 virtual void drawRRect(const SkDraw&, const SkRRect& r, | 74 virtual void drawRRect(const SkDraw&, const SkRRect& r, |
74 const SkPaint& paint) SK_OVERRIDE; | 75 const SkPaint& paint) SK_OVERRIDE; |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 bool bicubic); | 201 bool bicubic); |
201 | 202 |
202 bool drawDashLine(const SkPoint pts[2], const SkPaint& paint); | 203 bool drawDashLine(const SkPoint pts[2], const SkPaint& paint); |
203 | 204 |
204 static SkPicture::AccelData::Key ComputeAccelDataKey(); | 205 static SkPicture::AccelData::Key ComputeAccelDataKey(); |
205 | 206 |
206 typedef SkBaseDevice INHERITED; | 207 typedef SkBaseDevice INHERITED; |
207 }; | 208 }; |
208 | 209 |
209 #endif | 210 #endif |
OLD | NEW |