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

Side by Side Diff: tools/viewer/sk_app/Window.cpp

Issue 2069653002: Use Offscreen Surface for Split Screen (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: More fixes Created 4 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
OLDNEW
1 /* 1 /*
2 * Copyright 2016 Google Inc. 2 * Copyright 2016 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 #include "Window.h" 8 #include "Window.h"
9 9
10 #include "GrRenderTarget.h"
10 #include "SkSurface.h" 11 #include "SkSurface.h"
11 #include "SkCanvas.h" 12 #include "SkCanvas.h"
12 #include "VulkanWindowContext.h" 13 #include "VulkanWindowContext.h"
13 14
14 namespace sk_app { 15 namespace sk_app {
15 16
16 static bool default_char_func(SkUnichar c, uint32_t modifiers, void* userData) { 17 static bool default_char_func(SkUnichar c, uint32_t modifiers, void* userData) {
17 return false; 18 return false;
18 } 19 }
19 20
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 if (!fIsContentInvalidated) { 107 if (!fIsContentInvalidated) {
107 fIsContentInvalidated = true; 108 fIsContentInvalidated = true;
108 onInval(); 109 onInval();
109 } 110 }
110 } 111 }
111 112
112 void Window::markInvalProcessed() { 113 void Window::markInvalProcessed() {
113 fIsContentInvalidated = false; 114 fIsContentInvalidated = false;
114 } 115 }
115 116
117 sk_sp<SkSurface> Window::getOffscreenSurface(bool sRGB) {
118 return fWindowContext->createRenderSurface(nullptr, 0, true, sRGB);
119 }
120
116 } // namespace sk_app 121 } // namespace sk_app
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698