Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(319)

Unified Diff: include/core/SkDevice.h

Issue 577023002: hide deviceproperties, prepare the way for surfaceprops (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix SkTrackDevice.h Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/core/SkBitmapDevice.h ('k') | include/core/SkDeviceProperties.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkDevice.h
diff --git a/include/core/SkDevice.h b/include/core/SkDevice.h
index f55354bf0d2b52e7951abca58fcbb54d23519f16..e74e95f2f32c4fef7836659e9f2317c94e87f520 100644
--- a/include/core/SkDevice.h
+++ b/include/core/SkDevice.h
@@ -12,7 +12,6 @@
#include "SkBitmap.h"
#include "SkCanvas.h"
#include "SkColor.h"
-#include "SkDeviceProperties.h"
#include "SkImageFilter.h"
class SkClipStack;
@@ -21,7 +20,7 @@ struct SkIRect;
class SkMatrix;
class SkMetaData;
class SkRegion;
-
+struct SkDeviceProperties;
class GrRenderTarget;
class SK_API SkBaseDevice : public SkRefCnt {
@@ -32,24 +31,12 @@ public:
* Construct a new device.
*/
SkBaseDevice();
-
- /**
- * Construct a new device.
- */
- SkBaseDevice(const SkDeviceProperties& deviceProperties);
-
virtual ~SkBaseDevice();
SkBaseDevice* createCompatibleDevice(const SkImageInfo&);
SkMetaData& getMetaData();
- /** Return the image properties of the device. */
- virtual const SkDeviceProperties& getDeviceProperties() const {
- //Currently, all the properties are leaky.
- return fLeakyProperties;
- }
-
/**
* Return ImageInfo for this device. If the canvas is not backed by pixels
* (cpu or gpu), then the info's ColorType will be kUnknown_SkColorType.
@@ -333,7 +320,9 @@ protected:
* If the device does handle a property, that property should be set to the identity value
* for that property, effectively making it non-leaky.
*/
- SkDeviceProperties fLeakyProperties;
+ const SkDeviceProperties& getLeakyProperties() const {
+ return *fLeakyProperties;
+ }
/**
* PRIVATE / EXPERIMENTAL -- do not call
@@ -390,6 +379,7 @@ private:
SkIPoint fOrigin;
SkMetaData* fMetaData;
+ SkDeviceProperties* fLeakyProperties; // will always exist.
#ifdef SK_DEBUG
bool fAttachedToCanvas;
« no previous file with comments | « include/core/SkBitmapDevice.h ('k') | include/core/SkDeviceProperties.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698