Index: src/gpu/SkGpuDevice.h |
diff --git a/src/gpu/SkGpuDevice.h b/src/gpu/SkGpuDevice.h |
index 5fbc9f1b487a09dfdaaee26d15f30ccc28b20815..8a0866051993c85a655e2682b42345020e630b8d 100644 |
--- a/src/gpu/SkGpuDevice.h |
+++ b/src/gpu/SkGpuDevice.h |
@@ -24,6 +24,7 @@ struct GrSkDrawProcs; |
class GrAccelData; |
struct GrCachedLayer; |
class GrTextContext; |
+class SkSurface_Gpu; |
/** |
* Subclass of SkBaseDevice, which directs all drawing to the GrGpu owned by the |
@@ -48,8 +49,12 @@ public: |
static SkGpuDevice* Create(GrContext*, SkSurface::Budgeted, const SkImageInfo&, |
int sampleCount, const SkSurfaceProps*, unsigned flags = 0); |
+ static SkGpuDevice* CreateWithReverseOwnershipDeprecated(GrRenderTarget* target, const SkSurfaceProps*, unsigned flags = 0); |
+ |
virtual ~SkGpuDevice(); |
+ void setSurface(SkSurface_Gpu* surface); |
+ |
SkGpuDevice* cloneDevice(const SkSurfaceProps& props) { |
SkBaseDevice* dev = this->onCreateCompatibleDevice(CreateInfo(this->imageInfo(), |
kGeneral_Usage, |
@@ -64,7 +69,6 @@ public: |
void swapRenderTarget(GrRenderTarget* newTarget); |
- |
GrRenderTarget* accessRenderTarget() SK_OVERRIDE; |
SkImageInfo imageInfo() const SK_OVERRIDE { |
@@ -73,6 +77,8 @@ public: |
const SkSurfaceProps& surfaceProps() const { return fSurfaceProps; } |
+ void discard() SK_OVERRIDE; |
+ |
void drawPaint(const SkDraw&, const SkPaint& paint) SK_OVERRIDE; |
virtual void drawPoints(const SkDraw&, SkCanvas::PointMode mode, size_t count, |
const SkPoint[], const SkPaint& paint) SK_OVERRIDE; |
@@ -146,7 +152,8 @@ private: |
// remove when our clients don't rely on accessBitmap() |
SkBitmap fLegacyBitmap; |
bool fNeedClear; |
- |
+ SkSurface_Gpu* fSurface; |
+ bool fDeviceOwnsSurface; |
SkGpuDevice(GrRenderTarget*, const SkSurfaceProps*, unsigned flags); |
SkBaseDevice* onCreateCompatibleDevice(const CreateInfo&) SK_OVERRIDE; |