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

Unified Diff: src/gpu/GrAARectRenderer.cpp

Issue 14972013: Update shader rect drawing path for r9087 (removal of isIRect "opt") (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 7 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 | « include/gpu/GrAARectRenderer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrAARectRenderer.cpp
===================================================================
--- src/gpu/GrAARectRenderer.cpp (revision 9087)
+++ src/gpu/GrAARectRenderer.cpp (working copy)
@@ -487,8 +487,7 @@
void GrAARectRenderer::shaderFillAARect(GrGpu* gpu,
GrDrawTarget* target,
const GrRect& rect,
- const SkMatrix& combinedMatrix,
- const GrRect& devRect) {
+ const SkMatrix& combinedMatrix) {
GrDrawState* drawState = target->drawState();
SkPoint center = SkPoint::Make(rect.centerX(), rect.centerY());
@@ -536,6 +535,9 @@
verts[i].fWidthHeight.fY = newHeight;
}
+ SkRect devRect;
+ combinedMatrix.mapRect(&devRect, rect);
+
SkRect devBounds = {
devRect.fLeft - SK_ScalarHalf,
devRect.fTop - SK_ScalarHalf,
@@ -556,8 +558,7 @@
void GrAARectRenderer::shaderFillAlignedAARect(GrGpu* gpu,
GrDrawTarget* target,
const GrRect& rect,
- const SkMatrix& combinedMatrix,
- const GrRect& devRect) {
+ const SkMatrix& combinedMatrix) {
GrDrawState* drawState = target->drawState();
SkASSERT(combinedMatrix.rectStaysRect());
@@ -583,6 +584,9 @@
static const int kOffsetIndex = 1;
drawState->setEffect(kEdgeEffectStage, effect, kOffsetIndex)->unref();
+ SkRect devRect;
+ combinedMatrix.mapRect(&devRect, rect);
+
SkRect devBounds = {
devRect.fLeft - SK_ScalarHalf,
devRect.fTop - SK_ScalarHalf,
« no previous file with comments | « include/gpu/GrAARectRenderer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698