summaryrefslogtreecommitdiffstats
path: root/gfx/gl/SharedSurface.h
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/gl/SharedSurface.h')
-rw-r--r--gfx/gl/SharedSurface.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/gfx/gl/SharedSurface.h b/gfx/gl/SharedSurface.h
index 4168de69a2..12aace9e9e 100644
--- a/gfx/gl/SharedSurface.h
+++ b/gfx/gl/SharedSurface.h
@@ -182,8 +182,13 @@ class SurfaceFactory {
const SharedSurfaceDesc&) = 0;
public:
+ virtual bool SupportsCspaces() const { return false; }
+
UniquePtr<SharedSurface> CreateShared(const gfx::IntSize& size,
gfx::ColorSpace2 cs) {
+ if (!SupportsCspaces()) {
+ cs = gfx::ColorSpace2::Display;
+ }
return CreateSharedImpl({mDesc, size, cs});
}
};