Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(261)

Unified Diff: src/gpu/GrSoftwarePathRenderer.cpp

Issue 19449002: Replace all instances of GrRect with SkRect. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrSWMaskHelper.cpp ('k') | src/gpu/GrStencilAndCoverPathRenderer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrSoftwarePathRenderer.cpp
diff --git a/src/gpu/GrSoftwarePathRenderer.cpp b/src/gpu/GrSoftwarePathRenderer.cpp
index 21adc625dd2f7691f0706191f3a3ccad81b62889..d0936d6b28a37427b31d0b66cda1dc7138dfccdd 100644
--- a/src/gpu/GrSoftwarePathRenderer.cpp
+++ b/src/gpu/GrSoftwarePathRenderer.cpp
@@ -29,9 +29,9 @@ bool GrSoftwarePathRenderer::canDrawPath(const SkPath&,
}
GrPathRenderer::StencilSupport GrSoftwarePathRenderer::onGetStencilSupport(
- const SkPath&,
- const SkStrokeRec&,
- const GrDrawTarget*) const {
+ const SkPath&,
+ const SkStrokeRec&,
+ const GrDrawTarget*) const {
return GrPathRenderer::kNoSupport_StencilSupport;
}
@@ -44,14 +44,14 @@ namespace {
bool get_path_and_clip_bounds(const GrDrawTarget* target,
const SkPath& path,
const SkMatrix& matrix,
- GrIRect* devPathBounds,
- GrIRect* devClipBounds) {
+ SkIRect* devPathBounds,
+ SkIRect* devClipBounds) {
// compute bounds as intersection of rt size, clip, and path
const GrRenderTarget* rt = target->getDrawState().getRenderTarget();
if (NULL == rt) {
return false;
}
- *devPathBounds = GrIRect::MakeWH(rt->width(), rt->height());
+ *devPathBounds = SkIRect::MakeWH(rt->width(), rt->height());
target->getClip()->getConservativeBounds(rt, devClipBounds);
@@ -62,9 +62,9 @@ bool get_path_and_clip_bounds(const GrDrawTarget* target,
}
if (!path.getBounds().isEmpty()) {
- GrRect pathSBounds;
+ SkRect pathSBounds;
matrix.mapRect(&pathSBounds, path.getBounds());
- GrIRect pathIBounds;
+ SkIRect pathIBounds;
pathSBounds.roundOut(&pathIBounds);
if (!devPathBounds->intersect(pathIBounds)) {
// set the correct path bounds, as this would be used later.
@@ -72,7 +72,7 @@ bool get_path_and_clip_bounds(const GrDrawTarget* target,
return false;
}
} else {
- *devPathBounds = GrIRect::EmptyIRect();
+ *devPathBounds = SkIRect::EmptyIRect();
return false;
}
return true;
@@ -80,13 +80,13 @@ bool get_path_and_clip_bounds(const GrDrawTarget* target,
////////////////////////////////////////////////////////////////////////////////
void draw_around_inv_path(GrDrawTarget* target,
- const GrIRect& devClipBounds,
- const GrIRect& devPathBounds) {
+ const SkIRect& devClipBounds,
+ const SkIRect& devPathBounds) {
GrDrawState::AutoViewMatrixRestore avmr;
if (!avmr.setIdentity(target->drawState())) {
return;
}
- GrRect rect;
+ SkRect rect;
if (devClipBounds.fTop < devPathBounds.fTop) {
rect.iset(devClipBounds.fLeft, devClipBounds.fTop,
devClipBounds.fRight, devPathBounds.fTop);
@@ -126,7 +126,7 @@ bool GrSoftwarePathRenderer::onDrawPath(const SkPath& path,
SkMatrix vm = drawState->getViewMatrix();
- GrIRect devPathBounds, devClipBounds;
+ SkIRect devPathBounds, devClipBounds;
if (!get_path_and_clip_bounds(target, path, vm,
&devPathBounds, &devClipBounds)) {
if (path.isInverseFillType()) {
« no previous file with comments | « src/gpu/GrSWMaskHelper.cpp ('k') | src/gpu/GrStencilAndCoverPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698