From 2d1ee7936e3536e45c963db004e3b512bb415fd8 Mon Sep 17 00:00:00 2001 From: brianosman Date: Thu, 5 May 2016 12:24:31 -0700 Subject: Added --deepColor option to SampleApp, triggers creation of a ten-bit/channel buffer. (Only on Windows at the moment). Uses new effect to do the final gamma adjustment BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1919993002 Review-Url: https://codereview.chromium.org/1919993002 --- include/views/SkOSWindow_Android.h | 3 ++- include/views/SkOSWindow_Mac.h | 3 ++- include/views/SkOSWindow_SDL.h | 2 +- include/views/SkOSWindow_Unix.h | 2 +- include/views/SkOSWindow_Win.h | 4 ++-- include/views/SkOSWindow_iOS.h | 3 ++- include/views/SkWindow.h | 6 ++++++ 7 files changed, 16 insertions(+), 7 deletions(-) (limited to 'include/views') diff --git a/include/views/SkOSWindow_Android.h b/include/views/SkOSWindow_Android.h index 74175bafd1..234e65c256 100644 --- a/include/views/SkOSWindow_Android.h +++ b/include/views/SkOSWindow_Android.h @@ -28,7 +28,8 @@ public: kNativeGL_BackEndType, }; - bool attach(SkBackEndTypes attachType, int msaaSampleCount, AttachmentInfo* info); + bool attach(SkBackEndTypes attachType, int msaaSampleCount, bool deepColor, + AttachmentInfo* info); void release(); void present(); bool makeFullscreen() { return true; } diff --git a/include/views/SkOSWindow_Mac.h b/include/views/SkOSWindow_Mac.h index efa97bf872..4558a58833 100644 --- a/include/views/SkOSWindow_Mac.h +++ b/include/views/SkOSWindow_Mac.h @@ -33,7 +33,8 @@ public: }; void release(); - bool attach(SkBackEndTypes attachType, int msaaSampleCount, AttachmentInfo*); + bool attach(SkBackEndTypes attachType, int msaaSampleCount, bool deepColor, + AttachmentInfo*); void present(); bool makeFullscreen(); diff --git a/include/views/SkOSWindow_SDL.h b/include/views/SkOSWindow_SDL.h index 6823441715..1ab51ca415 100644 --- a/include/views/SkOSWindow_SDL.h +++ b/include/views/SkOSWindow_SDL.h @@ -29,7 +29,7 @@ public: }; void release(); - bool attach(SkBackEndTypes attachType, int msaaSampleCount, AttachmentInfo*); + bool attach(SkBackEndTypes attachType, int msaaSampleCount, bool deepColor, AttachmentInfo*); void present(); bool makeFullscreen(); void setVsync(bool); diff --git a/include/views/SkOSWindow_Unix.h b/include/views/SkOSWindow_Unix.h index 30386da183..2e1b9ccc81 100644 --- a/include/views/SkOSWindow_Unix.h +++ b/include/views/SkOSWindow_Unix.h @@ -44,7 +44,7 @@ public: #endif // SK_COMMAND_BUFFER }; - bool attach(SkBackEndTypes attachType, int msaaSampleCount, AttachmentInfo*); + bool attach(SkBackEndTypes attachType, int msaaSampleCount, bool deepColor, AttachmentInfo*); void release(); void present(); diff --git a/include/views/SkOSWindow_Win.h b/include/views/SkOSWindow_Win.h index eb8b1fc892..8d5378108e 100644 --- a/include/views/SkOSWindow_Win.h +++ b/include/views/SkOSWindow_Win.h @@ -47,7 +47,7 @@ public: #endif // SK_SUPPORT_GPU }; - bool attach(SkBackEndTypes attachType, int msaaSampleCount, AttachmentInfo*); + bool attach(SkBackEndTypes attachType, int msaaSampleCount, bool deepColor, AttachmentInfo*); void release(); void present(); @@ -127,7 +127,7 @@ private: void updateSize(); #if SK_SUPPORT_GPU - bool attachGL(int msaaSampleCount, AttachmentInfo* info); + bool attachGL(int msaaSampleCount, bool deepColor, AttachmentInfo* info); void detachGL(); void presentGL(); diff --git a/include/views/SkOSWindow_iOS.h b/include/views/SkOSWindow_iOS.h index 5a8b2e3d2f..c0b2fc3f0a 100644 --- a/include/views/SkOSWindow_iOS.h +++ b/include/views/SkOSWindow_iOS.h @@ -22,7 +22,8 @@ public: }; void release(); - bool attach(SkBackEndTypes attachType, int msaaSampleCount, AttachmentInfo*); + bool attach(SkBackEndTypes attachType, int msaaSampleCount, bool deepColor, + AttachmentInfo*); void present(); bool makeFullscreen() { return true; } diff --git a/include/views/SkWindow.h b/include/views/SkWindow.h index b4fabd253e..341046aacc 100644 --- a/include/views/SkWindow.h +++ b/include/views/SkWindow.h @@ -32,8 +32,14 @@ public: virtual ~SkWindow(); struct AttachmentInfo { + AttachmentInfo() + : fSampleCount(0) + , fStencilBits(0) + , fColorBits(0) {} + int fSampleCount; int fStencilBits; + int fColorBits; }; SkSurfaceProps getSurfaceProps() const { return fSurfaceProps; } -- cgit v1.2.3