diff options
author | 2014-08-20 01:36:23 -0700 | |
---|---|---|
committer | 2014-08-20 01:36:24 -0700 | |
commit | ccdaa0422501e5cbcba53d6bd19f2736f1beaef3 (patch) | |
tree | 906738bcb15b393917e80d64a30cd23d7343e29c /src/gpu/GrGpu.cpp | |
parent | cecc91c4446c9c2f9b95736e206bfd1d507a75a9 (diff) |
Separate GL path rendering state from GrGpuGL to GrGLPathRendering
Separate GL path rendering state from GrGpuGL to GrGLPathRendering. This
makes GrGpuGL code simpler.
The intention is that while GrGpuGL represents the global environment for GL,
the GrGLPathRendering represents the global environment for path rendering
extension.
Add GrPathRendering, a base class for path rendering, and inherit
GrGLPathRendering from that. Move the path rendering virtual functions from
GrGpu to GrPathRendering.
R=bsalomon@google.com, cdalton@nvidia.com
Author: kkinnunen@nvidia.com
Review URL: https://codereview.chromium.org/452823002
Diffstat (limited to 'src/gpu/GrGpu.cpp')
-rw-r--r-- | src/gpu/GrGpu.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/gpu/GrGpu.cpp b/src/gpu/GrGpu.cpp index 0b49e7445a..74df26002d 100644 --- a/src/gpu/GrGpu.cpp +++ b/src/gpu/GrGpu.cpp @@ -215,13 +215,12 @@ GrIndexBuffer* GrGpu::createIndexBuffer(size_t size, bool dynamic) { GrPath* GrGpu::createPath(const SkPath& path, const SkStrokeRec& stroke) { SkASSERT(this->caps()->pathRenderingSupport()); this->handleDirtyContext(); - return this->onCreatePath(path, stroke); + return this->pathRendering()->createPath(path, stroke); } GrPathRange* GrGpu::createPathRange(size_t size, const SkStrokeRec& stroke) { - SkASSERT(this->caps()->pathRenderingSupport()); this->handleDirtyContext(); - return this->onCreatePathRange(size, stroke); + return this->pathRendering()->createPathRange(size, stroke); } void GrGpu::clear(const SkIRect* rect, @@ -407,7 +406,7 @@ void GrGpu::onStencilPath(const GrPath* path, SkPath::FillType fill) { return; } - this->onGpuStencilPath(path, fill); + this->pathRendering()->stencilPath(path, fill); } @@ -422,7 +421,7 @@ void GrGpu::onDrawPath(const GrPath* path, SkPath::FillType fill, return; } - this->onGpuDrawPath(path, fill); + this->pathRendering()->drawPath(path, fill); } void GrGpu::onDrawPaths(const GrPathRange* pathRange, @@ -438,7 +437,7 @@ void GrGpu::onDrawPaths(const GrPathRange* pathRange, return; } - this->onGpuDrawPaths(pathRange, indices, count, transforms, transformsType, fill); + this->pathRendering()->drawPaths(pathRange, indices, count, transforms, transformsType, fill); } void GrGpu::finalizeReservedVertices() { |