Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(733)

Unified Diff: gpu/src/GrContext.cpp

Issue 4515071: use SkPath for GrPath, removing GrPathIter entirely (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: add tesselatedpathrenderer Created 13 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/src/GrClip.cpp ('k') | gpu/src/GrGpu.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/src/GrContext.cpp
===================================================================
--- gpu/src/GrContext.cpp (revision 1330)
+++ gpu/src/GrContext.cpp (working copy)
@@ -19,7 +19,6 @@
#include "GrTextureCache.h"
#include "GrTextStrike.h"
#include "GrMemory.h"
-#include "GrPathIter.h"
#include "GrClipIterator.h"
#include "GrIndexBuffer.h"
#include "GrInOrderDrawBuffer.h"
@@ -1155,10 +1154,8 @@
///////////////////////////////////////////////////////////////////////////////
-void GrContext::drawPath(const GrPaint& paint,
- GrPathIter* path,
- GrPathFill fill,
- const GrPoint* translate) {
+void GrContext::drawPath(const GrPaint& paint, const GrPath& path,
+ GrPathFill fill, const GrPoint* translate) {
GrDrawTarget* target = this->prepareToDraw(paint, kUnbuffered_DrawCategory);
GrPathRenderer* pr = this->getPathRenderer(target, path, fill);
@@ -1180,8 +1177,8 @@
return;
}
}
- GrRect pathBounds;
- if (path->getConservativeBounds(&pathBounds)) {
+ GrRect pathBounds = path.getBounds();
+ if (!pathBounds.isEmpty()) {
GrIRect pathIBounds;
target->getViewMatrix().mapRect(&pathBounds, pathBounds);
pathBounds.roundOut(&pathIBounds);
@@ -1204,15 +1201,6 @@
pr->drawPath(target, enabledStages, path, fill, translate);
}
-void GrContext::drawPath(const GrPaint& paint,
- const GrPath& path,
- GrPathFill fill,
- const GrPoint* translate) {
- GrPath::Iter iter(path);
- this->drawPath(paint, &iter, fill, translate);
-}
-
-
////////////////////////////////////////////////////////////////////////////////
void GrContext::flush(int flagsBitfield) {
@@ -1483,7 +1471,7 @@
}
GrPathRenderer* GrContext::getPathRenderer(const GrDrawTarget* target,
- GrPathIter* path,
+ const GrPath& path,
GrPathFill fill) {
if (NULL != fCustomPathRenderer &&
fCustomPathRenderer->canDrawPath(target, path, fill)) {
« no previous file with comments | « gpu/src/GrClip.cpp ('k') | gpu/src/GrGpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b