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

Unified Diff: src/views/win/SkOSWindow_win.cpp

Issue 1919993002: Added --deepColor option to SampleApp, triggers creation of a ten-bit/channel buffer on Windows. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: More cleanup Created 4 years, 8 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
Index: src/views/win/SkOSWindow_win.cpp
diff --git a/src/views/win/SkOSWindow_win.cpp b/src/views/win/SkOSWindow_win.cpp
index a8d05d96f73bf076186f48b28ead564603840c99..d0903ba0c93b18e42f840f500f3549e6d715354f 100644
--- a/src/views/win/SkOSWindow_win.cpp
+++ b/src/views/win/SkOSWindow_win.cpp
@@ -339,10 +339,10 @@ void SkEvent::SignalQueueTimer(SkMSec delay)
#if SK_SUPPORT_GPU
-bool SkOSWindow::attachGL(int msaaSampleCount, AttachmentInfo* info) {
+bool SkOSWindow::attachGL(int msaaSampleCount, bool tenBitColor, AttachmentInfo* info) {
HDC dc = GetDC((HWND)fHWND);
if (NULL == fHGLRC) {
- fHGLRC = SkCreateWGLContext(dc, msaaSampleCount,
+ fHGLRC = SkCreateWGLContext(dc, msaaSampleCount, tenBitColor,
kGLPreferCompatibilityProfile_SkWGLContextRequest);
if (NULL == fHGLRC) {
return false;
@@ -651,7 +651,8 @@ void SkOSWindow::presentCommandBuffer() {
#endif // SK_SUPPORT_GPU
// return true on success
-bool SkOSWindow::attach(SkBackEndTypes attachType, int msaaSampleCount, AttachmentInfo* info) {
+bool SkOSWindow::attach(SkBackEndTypes attachType, int msaaSampleCount, bool tenBitColor,
+ AttachmentInfo* info) {
// attach doubles as "windowResize" so we need to allo
// already bound states to pass through again
@@ -665,7 +666,7 @@ bool SkOSWindow::attach(SkBackEndTypes attachType, int msaaSampleCount, Attachme
break;
#if SK_SUPPORT_GPU
case kNativeGL_BackEndType:
- result = attachGL(msaaSampleCount, info);
+ result = attachGL(msaaSampleCount, tenBitColor, info);
break;
#if SK_ANGLE
case kANGLE_BackEndType:

Powered by Google App Engine
This is Rietveld 408576698