X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fthird_party%2Fskia%2Fsrc%2Fgpu%2Fgl%2FGrGLPathRange.h;h=f21ce3a7c97cf7cc8115fd9a5d616e766df2286f;hb=3545e9f2671f595d2a2f3ee75ca0393b01e35ef6;hp=927310d651e004424b0f3d23b46d0c264a152e00;hpb=7d210d4c7e9ba36e635eabc5b5780495f8a63292;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/third_party/skia/src/gpu/gl/GrGLPathRange.h b/src/third_party/skia/src/gpu/gl/GrGLPathRange.h index 927310d..f21ce3a 100644 --- a/src/third_party/skia/src/gpu/gl/GrGLPathRange.h +++ b/src/third_party/skia/src/gpu/gl/GrGLPathRange.h @@ -22,25 +22,38 @@ class GrGpuGL; class GrGLPathRange : public GrPathRange { public: - GrGLPathRange(GrGpuGL*, size_t size, const SkStrokeRec&); + /** + * Initialize a GL path range from a PathGenerator. This class will allocate + * the GPU path objects and initialize them lazily. + */ + GrGLPathRange(GrGpuGL*, PathGenerator*, const SkStrokeRec&); + + /** + * Initialize a GL path range from an existing range of pre-initialized GPU + * path objects. This class assumes ownership of the GPU path objects and + * will delete them when done. + */ + GrGLPathRange(GrGpuGL*, + GrGLuint basePathID, + int numPaths, + size_t gpuMemorySize, + const SkStrokeRec&); + virtual ~GrGLPathRange(); GrGLuint basePathID() const { return fBasePathID; } - virtual void initAt(size_t index, const SkPath&); - - // TODO: Use a better approximation for the individual path sizes. - virtual size_t gpuMemorySize() const SK_OVERRIDE { - return 100 * fNumDefinedPaths; - } + virtual size_t gpuMemorySize() const SK_OVERRIDE { return fGpuMemorySize; } protected: + virtual void onInitPath(int index, const SkPath&) const; + virtual void onRelease() SK_OVERRIDE; virtual void onAbandon() SK_OVERRIDE; private: GrGLuint fBasePathID; - size_t fNumDefinedPaths; + mutable size_t fGpuMemorySize; typedef GrPathRange INHERITED; };