| 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 SkSurface* VisualBench::createSurface() { | 94 SkSurface* VisualBench::createSurface() { |
| 95 SkSurfaceProps props(INHERITED::getSurfaceProps()); | 95 SkSurfaceProps props(INHERITED::getSurfaceProps()); |
| 96 return SkSurface::NewRenderTargetDirect(fRenderTarget, &props); | 96 return SkSurface::NewRenderTargetDirect(fRenderTarget, &props); |
| 97 } | 97 } |
| 98 | 98 |
| 99 bool VisualBench::setupBackend() { | 99 bool VisualBench::setupBackend() { |
| 100 this->setColorType(kRGBA_8888_SkColorType); | 100 this->setColorType(kRGBA_8888_SkColorType); |
| 101 this->setVisibleP(true); | 101 this->setVisibleP(true); |
| 102 this->setClipToBounds(false); | 102 this->setClipToBounds(false); |
| 103 | 103 |
| 104 this->setFullscreen(true); | 104 if (!this->makeFullscreen()) { |
| 105 SkDebugf("Could not go fullscreen!"); |
| 106 } |
| 105 if (!this->attach(kNativeGL_BackEndType, FLAGS_msaa, &fAttachmentInfo)) { | 107 if (!this->attach(kNativeGL_BackEndType, FLAGS_msaa, &fAttachmentInfo)) { |
| 106 SkDebugf("Not possible to create backend.\n"); | 108 SkDebugf("Not possible to create backend.\n"); |
| 107 INHERITED::detach(); | 109 INHERITED::detach(); |
| 108 return false; | 110 return false; |
| 109 } | 111 } |
| 110 | 112 |
| 111 this->setVsync(false); | 113 this->setVsync(false); |
| 112 this->resetContext(); | 114 this->resetContext(); |
| 113 return true; | 115 return true; |
| 114 } | 116 } |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 | 226 |
| 225 void application_term() { | 227 void application_term() { |
| 226 SkEvent::Term(); | 228 SkEvent::Term(); |
| 227 SkGraphics::Term(); | 229 SkGraphics::Term(); |
| 228 } | 230 } |
| 229 | 231 |
| 230 SkOSWindow* create_sk_window(void* hwnd, int argc, char** argv) { | 232 SkOSWindow* create_sk_window(void* hwnd, int argc, char** argv) { |
| 231 return new VisualBench(hwnd, argc, argv); | 233 return new VisualBench(hwnd, argc, argv); |
| 232 } | 234 } |
| 233 | 235 |
| OLD | NEW |