| 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 | 9 |
| 10 #include "SkExample.h" | 10 #include "SkExample.h" |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 SkSafeUnref(fRenderTarget); | 61 SkSafeUnref(fRenderTarget); |
| 62 fRenderTarget = NULL; | 62 fRenderTarget = NULL; |
| 63 | 63 |
| 64 detach(); | 64 detach(); |
| 65 } | 65 } |
| 66 } | 66 } |
| 67 | 67 |
| 68 bool SkExampleWindow::setupBackend(DeviceType type) { | 68 bool SkExampleWindow::setupBackend(DeviceType type) { |
| 69 fType = type; | 69 fType = type; |
| 70 | 70 |
| 71 this->setConfig(SkBitmap::kARGB_8888_Config); | 71 this->setColorType(kRGBA_8888_SkColorType); |
| 72 this->setVisibleP(true); | 72 this->setVisibleP(true); |
| 73 this->setClipToBounds(false); | 73 this->setClipToBounds(false); |
| 74 | 74 |
| 75 bool result = attach(kNativeGL_BackEndType, 0 /*msaa*/, &fAttachmentInfo); | 75 bool result = attach(kNativeGL_BackEndType, 0 /*msaa*/, &fAttachmentInfo); |
| 76 if (false == result) { | 76 if (false == result) { |
| 77 SkDebugf("Not possible to create backend.\n"); | 77 SkDebugf("Not possible to create backend.\n"); |
| 78 detach(); | 78 detach(); |
| 79 return false; | 79 return false; |
| 80 } | 80 } |
| 81 | 81 |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 SkDebugf("No SkExample that matches your query\n"); | 185 SkDebugf("No SkExample that matches your query\n"); |
| 186 } | 186 } |
| 187 } | 187 } |
| 188 return true; | 188 return true; |
| 189 } | 189 } |
| 190 | 190 |
| 191 SkOSWindow* create_sk_window(void* hwnd, int argc, char** argv) { | 191 SkOSWindow* create_sk_window(void* hwnd, int argc, char** argv) { |
| 192 SkCommandLineFlags::Parse(argc, argv); | 192 SkCommandLineFlags::Parse(argc, argv); |
| 193 return new SkExampleWindow(hwnd); | 193 return new SkExampleWindow(hwnd); |
| 194 } | 194 } |
| OLD | NEW |