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

Side by Side Diff: experimental/SkV8Example/SkV8Example.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: Rebase Created 4 years, 7 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 unified diff | Download patch
« no previous file with comments | « example/HelloWorld.cpp ('k') | experimental/iOSSampleApp/SkSampleUIView.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 * 7 *
8 */ 8 */
9 #include <v8.h> 9 #include <v8.h>
10 #include <include/libplatform/libplatform.h> 10 #include <include/libplatform/libplatform.h>
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 SkSafeUnref(fCurRenderTarget); 67 SkSafeUnref(fCurRenderTarget);
68 SkSafeUnref(fCurSurface); 68 SkSafeUnref(fCurSurface);
69 #endif 69 #endif
70 } 70 }
71 71
72 #if SK_SUPPORT_GPU 72 #if SK_SUPPORT_GPU
73 void SkV8ExampleWindow::windowSizeChanged() { 73 void SkV8ExampleWindow::windowSizeChanged() {
74 if (FLAGS_gpu) { 74 if (FLAGS_gpu) {
75 SkOSWindow::AttachmentInfo attachmentInfo; 75 SkOSWindow::AttachmentInfo attachmentInfo;
76 bool result = this->attach( 76 bool result = this->attach(
77 SkOSWindow::kNativeGL_BackEndType, 0, &attachmentInfo); 77 SkOSWindow::kNativeGL_BackEndType, 0, false, &attachmentInfo);
78 if (!result) { 78 if (!result) {
79 printf("Failed to attach."); 79 printf("Failed to attach.");
80 exit(1); 80 exit(1);
81 } 81 }
82 82
83 fCurIntf = GrGLCreateNativeInterface(); 83 fCurIntf = GrGLCreateNativeInterface();
84 fCurContext = GrContext::Create( 84 fCurContext = GrContext::Create(
85 kOpenGL_GrBackend, (GrBackendContext) fCurIntf); 85 kOpenGL_GrBackend, (GrBackendContext) fCurIntf);
86 if (NULL == fCurIntf || NULL == fCurContext) { 86 if (NULL == fCurIntf || NULL == fCurContext) {
87 printf("Failed to initialize GL."); 87 printf("Failed to initialize GL.");
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 225
226 if (!jsContext->initialize()) { 226 if (!jsContext->initialize()) {
227 printf("Failed to initialize.\n"); 227 printf("Failed to initialize.\n");
228 exit(1); 228 exit(1);
229 } 229 }
230 SkV8ExampleWindow* win = new SkV8ExampleWindow(hwnd, jsContext); 230 SkV8ExampleWindow* win = new SkV8ExampleWindow(hwnd, jsContext);
231 global->setWindow(win); 231 global->setWindow(win);
232 232
233 return win; 233 return win;
234 } 234 }
OLDNEW
« no previous file with comments | « example/HelloWorld.cpp ('k') | experimental/iOSSampleApp/SkSampleUIView.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698