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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 SkV8ExampleWindow::SkV8ExampleWindow(void* hwnd, JsContext* context) | 45 SkV8ExampleWindow::SkV8ExampleWindow(void* hwnd, JsContext* context) |
46 : INHERITED(hwnd) | 46 : INHERITED(hwnd) |
47 , fJsContext(context) | 47 , fJsContext(context) |
48 #if SK_SUPPORT_GPU | 48 #if SK_SUPPORT_GPU |
49 , fCurContext(NULL) | 49 , fCurContext(NULL) |
50 , fCurIntf(NULL) | 50 , fCurIntf(NULL) |
51 , fCurRenderTarget(NULL) | 51 , fCurRenderTarget(NULL) |
52 , fCurSurface(NULL) | 52 , fCurSurface(NULL) |
53 #endif | 53 #endif |
54 { | 54 { |
55 this->setColorType(kBGRA_8888_SkColorType); | |
56 this->setVisibleP(true); | 55 this->setVisibleP(true); |
57 this->setClipToBounds(false); | 56 this->setClipToBounds(false); |
58 | 57 |
59 #if SK_SUPPORT_GPU | 58 #if SK_SUPPORT_GPU |
60 this->windowSizeChanged(); | 59 this->windowSizeChanged(); |
61 #endif | 60 #endif |
62 } | 61 } |
63 | 62 |
64 SkV8ExampleWindow::~SkV8ExampleWindow() { | 63 SkV8ExampleWindow::~SkV8ExampleWindow() { |
65 #if SK_SUPPORT_GPU | 64 #if SK_SUPPORT_GPU |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 | 225 |
227 if (!jsContext->initialize()) { | 226 if (!jsContext->initialize()) { |
228 printf("Failed to initialize.\n"); | 227 printf("Failed to initialize.\n"); |
229 exit(1); | 228 exit(1); |
230 } | 229 } |
231 SkV8ExampleWindow* win = new SkV8ExampleWindow(hwnd, jsContext); | 230 SkV8ExampleWindow* win = new SkV8ExampleWindow(hwnd, jsContext); |
232 global->setWindow(win); | 231 global->setWindow(win); |
233 | 232 |
234 return win; | 233 return win; |
235 } | 234 } |
OLD | NEW |