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

Side by Side Diff: tools/VisualBench/VisualBench.cpp

Issue 1595503002: SampleApp: Remove SkWindow::setColorType (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: mac build fix Created 4 years, 11 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/mac/SkNSView.mm ('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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « src/views/mac/SkNSView.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698