2 * Copyright 2014 Google Inc.
5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file.
10 #ifndef SkV8Example_Path2D_DEFINED
11 #define SkV8Example_Path2D_DEFINED
20 // Path2D bridges between JS and SkPath.
21 class Path2D : SkNoncopyable {
26 static void AddToGlobal(Global* global) {
30 v8::Persistent<v8::Object>& persistent() {
39 // The handle to this object in JS space.
40 v8::Persistent<v8::Object> handle_;
44 // The global context we are running in.
45 static Global* gGlobal;
47 // The template for what a JS Path2D object looks like.
48 static v8::Persistent<v8::ObjectTemplate> gPath2DTemplate;