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

Side by Side Diff: tools/viewer/sk_app/GLWindowContext.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
« no previous file with comments | « no previous file | tools/viewer/sk_app/GLWindowContext.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 /* 2 /*
3 * Copyright 2016 Google Inc. 3 * Copyright 2016 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 #ifndef GLWindowContext_DEFINED 8 #ifndef GLWindowContext_DEFINED
9 #define GLWindowContext_DEFINED 9 #define GLWindowContext_DEFINED
10 10
11 11
12 #include "gl/GrGLInterface.h" 12 #include "gl/GrGLInterface.h"
13 13
14 #include "SkRefCnt.h" 14 #include "SkRefCnt.h"
15 #include "GrRenderTarget.h" 15 #include "GrRenderTarget.h"
16 #include "SkSurface.h" 16 #include "SkSurface.h"
17 17
18 #include "WindowContext.h" 18 #include "WindowContext.h"
19 19
20 class GrContext; 20 class GrContext;
21 21
22 namespace sk_app { 22 namespace sk_app {
23 23
24 class GLWindowContext : public WindowContext { 24 class GLWindowContext : public WindowContext {
25 public: 25 public:
26 sk_sp<SkSurface> getBackbufferSurface() override; 26 sk_sp<SkSurface> getBackbufferSurface() override;
27 27
28 bool isValid() override { return SkToBool(fBackendContext.get()); } 28 bool isValid() override { return SkToBool(fBackendContext.get()); }
29 29
30 void resize(uint32_t w, uint32_t h) override; 30 void resize(int w, int h) override;
31 void swapBuffers() override; 31 void swapBuffers() override;
32 32
33 void setDisplayParams(const DisplayParams& params) override; 33 void setDisplayParams(const DisplayParams& params) override;
34 34
35 GrBackendContext getBackendContext() override { 35 GrBackendContext getBackendContext() override {
36 return (GrBackendContext) fBackendContext.get(); 36 return (GrBackendContext) fBackendContext.get();
37 } 37 }
38 38
39 protected: 39 protected:
40 GLWindowContext(const DisplayParams&); 40 GLWindowContext(const DisplayParams&);
(...skipping 19 matching lines...) Expand all
60 // initializing fSampleCount, fStencilBits, and fColorBits! 60 // initializing fSampleCount, fStencilBits, and fColorBits!
61 int fSampleCount; 61 int fSampleCount;
62 int fStencilBits; 62 int fStencilBits;
63 int fColorBits; 63 int fColorBits;
64 int fActualColorBits; 64 int fActualColorBits;
65 }; 65 };
66 66
67 } // namespace sk_app 67 } // namespace sk_app
68 68
69 #endif 69 #endif
OLDNEW
« no previous file with comments | « no previous file | tools/viewer/sk_app/GLWindowContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698