Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(46)

Side by Side Diff: tools/VisualBench.cpp

Issue 1181723006: Move closeWindow()/setFullscreen()/setVSynv() from SkWindow to SkOSWindow (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/views/win/SkOSWindow_win.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/views/win/SkOSWindow_win.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698