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

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

Issue 1950983007: Add sRGB mode toggle to Viewer. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Bundle window surface parameters in struct, use SkColorType/SkColorProfileType Created 4 years, 7 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/sk_app/Window.cpp ('k') | tools/viewer/sk_app/android/Window_android.h » ('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 #ifndef WindowContext_DEFINED 7 #ifndef WindowContext_DEFINED
8 #define WindowContext_DEFINED 8 #define WindowContext_DEFINED
9 9
10 #include "DisplayParams.h"
10 #include "GrTypes.h" 11 #include "GrTypes.h"
11 12
12 class SkSurface; 13 class SkSurface;
13 14
14 namespace sk_app { 15 namespace sk_app {
15 16
16 // TODO: fill this out with an interface 17 // TODO: fill this out with an interface
17 class WindowContext { 18 class WindowContext {
18 public: 19 public:
19 virtual ~WindowContext() {} 20 virtual ~WindowContext() {}
20 21
21 virtual SkSurface* getBackbufferSurface() = 0; 22 virtual SkSurface* getBackbufferSurface() = 0;
22 23
23 virtual void swapBuffers() = 0; 24 virtual void swapBuffers() = 0;
24 25
25 virtual bool makeCurrent() = 0; 26 virtual bool makeCurrent() = 0;
26 27
27 virtual bool isValid() = 0; 28 virtual bool isValid() = 0;
28 29
29 virtual void resize(uint32_t w, uint32_t h) = 0; 30 virtual void resize(uint32_t w, uint32_t h) = 0;
30 31
32 virtual const DisplayParams& getDisplayParams() = 0;
33 virtual void setDisplayParams(const DisplayParams& params) = 0;
34
31 virtual GrBackendContext getBackendContext() = 0; 35 virtual GrBackendContext getBackendContext() = 0;
32 }; 36 };
33 37
34 } // namespace sk_app 38 } // namespace sk_app
35 39
36 #endif 40 #endif
OLDNEW
« no previous file with comments | « tools/viewer/sk_app/Window.cpp ('k') | tools/viewer/sk_app/android/Window_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698