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

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

Issue 2184163003: Enable backend switching for Windows Viewer (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Delete extra glMakeCurrent Created 4 years, 4 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/win/GLWindowContext_win.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 class SkSurface;
19 19
20 namespace sk_app { 20 namespace sk_app {
21 21
22 class WindowContext; 22 class WindowContext;
23 23
24 class Window { 24 class Window {
25 public: 25 public:
26 static Window* CreateNativeWindow(void* platformData); 26 static Window* CreateNativeWindow(void* platformData);
27 27
28 virtual ~Window() {}; 28 virtual ~Window() { this->detach(); };
29 29
30 virtual void setTitle(const char*) = 0; 30 virtual void setTitle(const char*) = 0;
31 virtual void show() = 0; 31 virtual void show() = 0;
32 virtual void setUIState(const Json::Value& state) {} // do nothing in defau lt 32 virtual void setUIState(const Json::Value& state) {} // do nothing in defau lt
33 33
34 // Shedules an invalidation event for window if one is not currently pending . 34 // Shedules an invalidation event for window if one is not currently pending .
35 // Make sure that either onPaint or markInvalReceived is called when the cli ent window consumes 35 // Make sure that either onPaint or markInvalReceived is called when the cli ent window consumes
36 // the the inval event. They unset fIsContentInvalided which allow future on Inval. 36 // the the inval event. They unset fIsContentInvalided which allow future on Inval.
37 void inval(); 37 void inval();
38 38
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 virtual void onInval() = 0; 192 virtual void onInval() = 0;
193 193
194 // Uncheck fIsContentInvalided to allow future inval/onInval. 194 // Uncheck fIsContentInvalided to allow future inval/onInval.
195 void markInvalProcessed(); 195 void markInvalProcessed();
196 196
197 bool fIsContentInvalidated = false; // use this to avoid duplicate invalida te events 197 bool fIsContentInvalidated = false; // use this to avoid duplicate invalida te events
198 }; 198 };
199 199
200 } // namespace sk_app 200 } // namespace sk_app
201 #endif 201 #endif
OLDNEW
« no previous file with comments | « tools/viewer/Viewer.cpp ('k') | tools/viewer/sk_app/win/GLWindowContext_win.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698