| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |