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

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

Issue 2182273002: SW backend for viewer on Windows (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update 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
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 "DisplayParams.h"
(...skipping 13 matching lines...) Expand all
24 , fSurfaceProps(SkSurfaceProps::kLegacyFontHost_InitType) {} 24 , fSurfaceProps(SkSurfaceProps::kLegacyFontHost_InitType) {}
25 25
26 virtual ~WindowContext() {} 26 virtual ~WindowContext() {}
27 27
28 virtual sk_sp<SkSurface> getBackbufferSurface() = 0; 28 virtual sk_sp<SkSurface> getBackbufferSurface() = 0;
29 29
30 virtual void swapBuffers() = 0; 30 virtual void swapBuffers() = 0;
31 31
32 virtual bool isValid() = 0; 32 virtual bool isValid() = 0;
33 33
34 virtual void resize(uint32_t w, uint32_t h) = 0; 34 virtual void resize(int w, int h) = 0;
35 35
36 const DisplayParams& getDisplayParams() { return fDisplayParams; } 36 const DisplayParams& getDisplayParams() { return fDisplayParams; }
37 virtual void setDisplayParams(const DisplayParams& params) = 0; 37 virtual void setDisplayParams(const DisplayParams& params) = 0;
38 38
39 SkSurfaceProps getSurfaceProps() const { return fSurfaceProps; } 39 SkSurfaceProps getSurfaceProps() const { return fSurfaceProps; }
40 void setSurfaceProps(const SkSurfaceProps& props) { 40 void setSurfaceProps(const SkSurfaceProps& props) {
41 fSurfaceProps = props; 41 fSurfaceProps = props;
42 } 42 }
43 43
44 virtual GrBackendContext getBackendContext() = 0; 44 virtual GrBackendContext getBackendContext() = 0;
(...skipping 17 matching lines...) Expand all
62 SkSurfaceProps fSurfaceProps; 62 SkSurfaceProps fSurfaceProps;
63 63
64 private: 64 private:
65 sk_sp<SkSurface> createSurface( 65 sk_sp<SkSurface> createSurface(
66 GrBackendRenderTargetDesc*, int colorBits, bool offscreen, bool forc eSRGB); 66 GrBackendRenderTargetDesc*, int colorBits, bool offscreen, bool forc eSRGB);
67 }; 67 };
68 68
69 } // namespace sk_app 69 } // namespace sk_app
70 70
71 #endif 71 #endif
OLDNEW
« no previous file with comments | « tools/viewer/sk_app/Window.cpp ('k') | tools/viewer/sk_app/android/RasterWindowContext_android.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698