| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 * | 6 * |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 #include "VisualBench.h" | 9 #include "VisualBench.h" |
| 10 | 10 |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 if (!fSurface) { | 79 if (!fSurface) { |
| 80 SkSurfaceProps props(INHERITED::getSurfaceProps()); | 80 SkSurfaceProps props(INHERITED::getSurfaceProps()); |
| 81 fSurface.reset(SkSurface::NewRenderTargetDirect(fRenderTarget, &props)); | 81 fSurface.reset(SkSurface::NewRenderTargetDirect(fRenderTarget, &props)); |
| 82 } | 82 } |
| 83 | 83 |
| 84 // The caller will wrap the SkSurface in an SkAutoTUnref | 84 // The caller will wrap the SkSurface in an SkAutoTUnref |
| 85 return SkRef(fSurface.get()); | 85 return SkRef(fSurface.get()); |
| 86 } | 86 } |
| 87 | 87 |
| 88 bool VisualBench::setupBackend() { | 88 bool VisualBench::setupBackend() { |
| 89 this->setColorType(kRGBA_8888_SkColorType); | |
| 90 this->setVisibleP(true); | 89 this->setVisibleP(true); |
| 91 this->setClipToBounds(false); | 90 this->setClipToBounds(false); |
| 92 | 91 |
| 93 if (FLAGS_fullscreen) { | 92 if (FLAGS_fullscreen) { |
| 94 if (!this->makeFullscreen()) { | 93 if (!this->makeFullscreen()) { |
| 95 SkDebugf("Could not go fullscreen!"); | 94 SkDebugf("Could not go fullscreen!"); |
| 96 } | 95 } |
| 97 } | 96 } |
| 98 | 97 |
| 99 this->resetContext(); | 98 this->resetContext(); |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 } | 186 } |
| 188 | 187 |
| 189 void application_term() { | 188 void application_term() { |
| 190 SkEvent::Term(); | 189 SkEvent::Term(); |
| 191 } | 190 } |
| 192 | 191 |
| 193 SkOSWindow* create_sk_window(void* hwnd, int argc, char** argv) { | 192 SkOSWindow* create_sk_window(void* hwnd, int argc, char** argv) { |
| 194 return new VisualBench(hwnd, argc, argv); | 193 return new VisualBench(hwnd, argc, argv); |
| 195 } | 194 } |
| 196 | 195 |
| OLD | NEW |