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

Unified Diff: src/gpu/GrDrawContext.cpp

Issue 1308503002: Create separate entry points for the various flavors of drawRect (Closed) Base URL: https://skia.googlesource.com/skia.git@fptexturetestdebug2
Patch Set: rebase onto master Created 5 years, 4 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/GrDefaultPathRenderer.cpp ('k') | src/gpu/GrDrawTarget.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDrawContext.cpp
diff --git a/src/gpu/GrDrawContext.cpp b/src/gpu/GrDrawContext.cpp
index 8b956476312f7c3d61ae6a33a9f001490124aa62..7590328421ec48212f457bcae9592e0e34598ed8 100644
--- a/src/gpu/GrDrawContext.cpp
+++ b/src/gpu/GrDrawContext.cpp
@@ -199,8 +199,7 @@ void GrDrawContext::drawPaint(GrRenderTarget* rt,
paint->getColor(),
SkMatrix::I(),
r,
- NULL,
- &localMatrix);
+ localMatrix);
}
}
@@ -305,7 +304,7 @@ void GrDrawContext::drawRect(GrRenderTarget* rt,
fDrawTarget->drawBatch(pipelineBuilder, batch);
} else {
// filled BW rect
- fDrawTarget->drawSimpleRect(pipelineBuilder, color, viewMatrix, rect);
+ fDrawTarget->drawBWRect(pipelineBuilder, color, viewMatrix, rect);
}
}
@@ -314,8 +313,27 @@ void GrDrawContext::drawNonAARectToRect(GrRenderTarget* rt,
const GrPaint& paint,
const SkMatrix& viewMatrix,
const SkRect& rectToDraw,
- const SkRect& localRect,
- const SkMatrix* localMatrix) {
+ const SkRect& localRect) {
+ RETURN_IF_ABANDONED
+ AutoCheckFlush acf(fContext);
+ if (!this->prepareToDraw(rt)) {
+ return;
+ }
+
+ GrPipelineBuilder pipelineBuilder(paint, rt, clip);
+ fDrawTarget->drawBWRect(pipelineBuilder,
+ paint.getColor(),
+ viewMatrix,
+ rectToDraw,
+ localRect);
+}
+
+void GrDrawContext::drawNonAARectWithLocalMatrix(GrRenderTarget* rt,
+ const GrClip& clip,
+ const GrPaint& paint,
+ const SkMatrix& viewMatrix,
+ const SkRect& rectToDraw,
+ const SkMatrix& localMatrix) {
RETURN_IF_ABANDONED
AutoCheckFlush acf(fContext);
if (!this->prepareToDraw(rt)) {
@@ -327,7 +345,6 @@ void GrDrawContext::drawNonAARectToRect(GrRenderTarget* rt,
paint.getColor(),
viewMatrix,
rectToDraw,
- &localRect,
localMatrix);
}
« no previous file with comments | « src/gpu/GrDefaultPathRenderer.cpp ('k') | src/gpu/GrDrawTarget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698