aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/private/SkSurfaceCharacterization.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/private/SkSurfaceCharacterization.h')
-rw-r--r--include/private/SkSurfaceCharacterization.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/include/private/SkSurfaceCharacterization.h b/include/private/SkSurfaceCharacterization.h
index 282043a879..40be90c685 100644
--- a/include/private/SkSurfaceCharacterization.h
+++ b/include/private/SkSurfaceCharacterization.h
@@ -10,12 +10,14 @@
#include "GrTypes.h"
+#include "SkSurfaceProps.h"
+
+class SkColorSpace;
+
#if SK_SUPPORT_GPU
#include "GrTypesPriv.h"
-#include "SkSurfaceProps.h"
class GrContextThreadSafeProxy;
-class SkColorSpace;
/** \class SkSurfaceCharacterization
A surface characterization contains all the information Ganesh requires to makes its internal
@@ -103,14 +105,23 @@ private:
class SkSurfaceCharacterization {
public:
- SkSurfaceCharacterization() : fWidth(0), fHeight(0) { }
+ SkSurfaceCharacterization()
+ : fWidth(0)
+ , fHeight(0)
+ , fSurfaceProps(0, kUnknown_SkPixelGeometry) {
+ }
int width() const { return fWidth; }
int height() const { return fHeight; }
+ SkColorSpace* colorSpace() const { return fColorSpace.get(); }
+ sk_sp<SkColorSpace> refColorSpace() const { return fColorSpace; }
+ const SkSurfaceProps& surfaceProps()const { return fSurfaceProps; }
private:
int fWidth;
int fHeight;
+ sk_sp<SkColorSpace> fColorSpace;
+ SkSurfaceProps fSurfaceProps;
};
#endif