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

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

Issue 2069653002: Use Offscreen Surface for Split Screen (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Better merge 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
« no previous file with comments | « tools/viewer/Viewer.cpp ('k') | tools/viewer/sk_app/Window.cpp » ('j') | 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 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 #ifndef Window_DEFINED 8 #ifndef Window_DEFINED
9 #define Window_DEFINED 9 #define Window_DEFINED
10 10
11 #include "DisplayParams.h" 11 #include "DisplayParams.h"
12 #include "SkRect.h" 12 #include "SkRect.h"
13 #include "SkTouchGesture.h" 13 #include "SkTouchGesture.h"
14 #include "SkTypes.h" 14 #include "SkTypes.h"
15 #include "SkJSONCPP.h" 15 #include "SkJSONCPP.h"
16 16
17 class SkCanvas; 17 class SkCanvas;
18 class SkSurface;
18 19
19 namespace sk_app { 20 namespace sk_app {
20 21
21 class WindowContext; 22 class WindowContext;
22 23
23 class Window { 24 class Window {
24 public: 25 public:
25 static Window* CreateNativeWindow(void* platformData); 26 static Window* CreateNativeWindow(void* platformData);
26 27
27 virtual ~Window() {}; 28 virtual ~Window() {};
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 void onUIStateChanged(const SkString& stateName, const SkString& stateValue) ; 155 void onUIStateChanged(const SkString& stateName, const SkString& stateValue) ;
155 void onPaint(); 156 void onPaint();
156 void onResize(uint32_t width, uint32_t height); 157 void onResize(uint32_t width, uint32_t height);
157 158
158 uint32_t width() { return fWidth; } 159 uint32_t width() { return fWidth; }
159 uint32_t height() { return fHeight; } 160 uint32_t height() { return fHeight; }
160 161
161 virtual const DisplayParams& getDisplayParams(); 162 virtual const DisplayParams& getDisplayParams();
162 void setDisplayParams(const DisplayParams& params); 163 void setDisplayParams(const DisplayParams& params);
163 164
165 // This is just for the sRGB split screen
166 sk_sp<SkSurface> getOffscreenSurface(bool forceSRGB);
167
164 protected: 168 protected:
165 Window(); 169 Window();
166 170
167 uint32_t fWidth; 171 uint32_t fWidth;
168 uint32_t fHeight; 172 uint32_t fHeight;
169 173
170 OnCharFunc fCharFunc; 174 OnCharFunc fCharFunc;
171 void* fCharUserData; 175 void* fCharUserData;
172 OnKeyFunc fKeyFunc; 176 OnKeyFunc fKeyFunc;
173 void* fKeyUserData; 177 void* fKeyUserData;
(...skipping 12 matching lines...) Expand all
186 virtual void onInval() = 0; 190 virtual void onInval() = 0;
187 191
188 // Uncheck fIsContentInvalided to allow future inval/onInval. 192 // Uncheck fIsContentInvalided to allow future inval/onInval.
189 void markInvalProcessed(); 193 void markInvalProcessed();
190 194
191 bool fIsContentInvalidated = false; // use this to avoid duplicate invalida te events 195 bool fIsContentInvalidated = false; // use this to avoid duplicate invalida te events
192 }; 196 };
193 197
194 } // namespace sk_app 198 } // namespace sk_app
195 #endif 199 #endif
OLDNEW
« no previous file with comments | « tools/viewer/Viewer.cpp ('k') | tools/viewer/sk_app/Window.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698