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

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

Issue 122453003: Add GPU, controlled via command line flag. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 6 years, 11 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 | experimental/SkV8Example/SkV8Example.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 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;
16 class GrGLInterface;
17 class GrRenderTarget;
18
15 class JsContext; 19 class JsContext;
16 20
17 class SkV8ExampleWindow : public SkOSWindow { 21 class SkV8ExampleWindow : public SkOSWindow {
18 public: 22 public:
19 SkV8ExampleWindow(void* hwnd, JsContext* canvas); 23 SkV8ExampleWindow(void* hwnd, JsContext* canvas);
20 24
21 protected: 25 protected:
22 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE; 26 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE;
27 virtual void onSizeChange() SK_OVERRIDE;
28
29 #if SK_SUPPORT_GPU
30 virtual SkCanvas* createCanvas() SK_OVERRIDE;
31 #endif
23 32
24 #ifdef SK_BUILD_FOR_WIN 33 #ifdef SK_BUILD_FOR_WIN
25 virtual void onHandleInval(const SkIRect&) SK_OVERRIDE; 34 virtual void onHandleInval(const SkIRect&) SK_OVERRIDE;
26 #endif 35 #endif
27 36
37 void windowSizeChanged();
38
28 private: 39 private:
29 typedef SkOSWindow INHERITED; 40 typedef SkOSWindow INHERITED;
30 JsContext* fJsContext; 41 JsContext* fJsContext;
42
43 #if SK_SUPPORT_GPU
44 GrContext* fCurContext;
45 const GrGLInterface* fCurIntf;
46 GrRenderTarget* fCurRenderTarget;
47 #endif
31 }; 48 };
32 49
33 #endif 50 #endif
OLDNEW
« no previous file with comments | « no previous file | experimental/SkV8Example/SkV8Example.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698