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

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

Issue 102803003: A simple draw() function in Javascript. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: clean up. Created 7 years 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 | Annotate | Revision Log
« 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 <v8.h>
14
13 #include "SkWindow.h" 15 #include "SkWindow.h"
14 16
17
18 using namespace v8;
19
20
15 class SkCanvas; 21 class SkCanvas;
16 22
17 23
18 class SkV8ExampleWindow : public SkOSWindow { 24 class SkV8ExampleWindow : public SkOSWindow {
19 public: 25 public:
20 SkV8ExampleWindow(void* hwnd); 26 SkV8ExampleWindow(void* hwnd,
27 Isolate* isolate,
28 Handle<Context> context,
29 Handle<Script> script);
21 30
22 31
23 protected: 32 protected:
24 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE; 33 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE;
25 34
26 35
36
27 #ifdef SK_BUILD_FOR_WIN 37 #ifdef SK_BUILD_FOR_WIN
28 virtual void onHandleInval(const SkIRect&) SK_OVERRIDE; 38 virtual void onHandleInval(const SkIRect&) SK_OVERRIDE;
29 #endif 39 #endif
30 40
31 private: 41 private:
32 typedef SkOSWindow INHERITED; 42 typedef SkOSWindow INHERITED;
43 Isolate* fIsolate;
44 Persistent<Context> fContext;
45 Persistent<Script> fScript;
46 SkScalar fRotationAngle;
33 }; 47 };
34 48
35 #endif 49 #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