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

Side by Side Diff: experimental/SkV8Example/SkV8Example.h

Issue 148523019: Move SkV8Example to SkSurface (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix gpu refcount for canvas held by surface. Created 6 years, 10 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 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
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 */ 8 */
9 9
10 #ifndef SkV8Example_DEFINED 10 #ifndef SkV8Example_DEFINED
11 #define SkV8Example_DEFINED 11 #define SkV8Example_DEFINED
12 12
13 #include "SkWindow.h" 13 #include "SkWindow.h"
14 14
15 class GrContext; 15 class GrContext;
16 class GrGLInterface; 16 class GrGLInterface;
17 class GrRenderTarget; 17 class GrRenderTarget;
18 class SkSurface;
18 19
19 class JsContext; 20 class JsContext;
20 21
21 class SkV8ExampleWindow : public SkOSWindow { 22 class SkV8ExampleWindow : public SkOSWindow {
22 public: 23 public:
23 SkV8ExampleWindow(void* hwnd, JsContext* canvas); 24 SkV8ExampleWindow(void* hwnd, JsContext* canvas);
24 25
25 protected: 26 protected:
26 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE; 27 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE;
27 virtual void onSizeChange() SK_OVERRIDE; 28 virtual void onSizeChange() SK_OVERRIDE;
28 29
29 #if SK_SUPPORT_GPU 30 #if SK_SUPPORT_GPU
30 virtual SkCanvas* createCanvas() SK_OVERRIDE; 31 virtual SkCanvas* createCanvas() SK_OVERRIDE;
31 #endif 32 #endif
32 33
33 #ifdef SK_BUILD_FOR_WIN 34 #ifdef SK_BUILD_FOR_WIN
34 virtual void onHandleInval(const SkIRect&) SK_OVERRIDE; 35 virtual void onHandleInval(const SkIRect&) SK_OVERRIDE;
35 #endif 36 #endif
36 37
37 void windowSizeChanged(); 38 void windowSizeChanged();
38 39
39 private: 40 private:
40 typedef SkOSWindow INHERITED; 41 typedef SkOSWindow INHERITED;
41 JsContext* fJsContext; 42 JsContext* fJsContext;
42 43
43 #if SK_SUPPORT_GPU 44 #if SK_SUPPORT_GPU
44 GrContext* fCurContext; 45 GrContext* fCurContext;
45 const GrGLInterface* fCurIntf; 46 const GrGLInterface* fCurIntf;
46 GrRenderTarget* fCurRenderTarget; 47 GrRenderTarget* fCurRenderTarget;
48 SkSurface* fCurSurface;
47 #endif 49 #endif
48 }; 50 };
49 51
50 #endif 52 #endif
OLDNEW
« no previous file with comments | « no previous file | experimental/SkV8Example/SkV8Example.cpp » ('j') | experimental/SkV8Example/SkV8Example.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698