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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 } | 71 } |
72 | 72 |
73 void VisualBench::setTitle() { | 73 void VisualBench::setTitle() { |
74 SkString title("VisualBench"); | 74 SkString title("VisualBench"); |
75 INHERITED::setTitle(title.c_str()); | 75 INHERITED::setTitle(title.c_str()); |
76 } | 76 } |
77 | 77 |
78 SkSurface* VisualBench::createSurface() { | 78 SkSurface* VisualBench::createSurface() { |
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::MakeRenderTargetDirect(fRenderTarget, &props).
release()); |
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->setVisibleP(true); | 89 this->setVisibleP(true); |
90 this->setClipToBounds(false); | 90 this->setClipToBounds(false); |
91 | 91 |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 } | 186 } |
187 | 187 |
188 void application_term() { | 188 void application_term() { |
189 SkEvent::Term(); | 189 SkEvent::Term(); |
190 } | 190 } |
191 | 191 |
192 SkOSWindow* create_sk_window(void* hwnd, int argc, char** argv) { | 192 SkOSWindow* create_sk_window(void* hwnd, int argc, char** argv) { |
193 return new VisualBench(hwnd, argc, argv); | 193 return new VisualBench(hwnd, argc, argv); |
194 } | 194 } |
195 | 195 |
OLD | NEW |