michael@0: michael@0: /* michael@0: * Copyright 2012 Google Inc. michael@0: * michael@0: * Use of this source code is governed by a BSD-style license that can be michael@0: * found in the LICENSE file. michael@0: */ michael@0: michael@0: #ifndef GrGLPath_DEFINED michael@0: #define GrGLPath_DEFINED michael@0: michael@0: #include "../GrPath.h" michael@0: #include "gl/GrGLFunctions.h" michael@0: michael@0: class GrGpuGL; michael@0: michael@0: /** michael@0: * Currently this represents a path built using GL_NV_path_rendering. If we michael@0: * support other GL path extensions then this would have to have a type enum michael@0: * and/or be subclassed. michael@0: */ michael@0: michael@0: class GrGLPath : public GrPath { michael@0: public: michael@0: GrGLPath(GrGpuGL* gpu, const SkPath& path, const SkStrokeRec& stroke); michael@0: virtual ~GrGLPath(); michael@0: GrGLuint pathID() const { return fPathID; } michael@0: // TODO: Figure out how to get an approximate size of the path in Gpu michael@0: // memory. michael@0: virtual size_t sizeInBytes() const SK_OVERRIDE { return 100; } michael@0: michael@0: protected: michael@0: virtual void onRelease() SK_OVERRIDE; michael@0: virtual void onAbandon() SK_OVERRIDE; michael@0: michael@0: private: michael@0: GrGLuint fPathID; michael@0: michael@0: typedef GrPath INHERITED; michael@0: }; michael@0: michael@0: #endif