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

Side by Side Diff: tools/VisualBench.cpp

Issue 1187643002: VisualBench on windows (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase 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/skia_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->attach(kNativeGL_BackEndType, FLAGS_msaa, &fAttachmentInfo)) { 105 if (!this->attach(kNativeGL_BackEndType, FLAGS_msaa, &fAttachmentInfo)) {
105 SkDebugf("Not possible to create backend.\n"); 106 SkDebugf("Not possible to create backend.\n");
106 INHERITED::detach(); 107 INHERITED::detach();
107 return false; 108 return false;
108 } 109 }
109 110
110 this->setFullscreen(true);
111 this->setVsync(false); 111 this->setVsync(false);
112 this->resetContext(); 112 this->resetContext();
113 return true; 113 return true;
114 } 114 }
115 115
116 void VisualBench::resetContext() { 116 void VisualBench::resetContext() {
117 fInterface.reset(GrGLCreateNativeInterface()); 117 fInterface.reset(GrGLCreateNativeInterface());
118 SkASSERT(fInterface); 118 SkASSERT(fInterface);
119 119
120 // setup contexts 120 // setup contexts
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 224
225 void application_term() { 225 void application_term() {
226 SkEvent::Term(); 226 SkEvent::Term();
227 SkGraphics::Term(); 227 SkGraphics::Term();
228 } 228 }
229 229
230 SkOSWindow* create_sk_window(void* hwnd, int argc, char** argv) { 230 SkOSWindow* create_sk_window(void* hwnd, int argc, char** argv) {
231 return new VisualBench(hwnd, argc, argv); 231 return new VisualBench(hwnd, argc, argv);
232 } 232 }
233 233
OLDNEW
« no previous file with comments | « src/views/win/skia_win.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698