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

Unified Diff: src/gpu/GrContext.cpp

Issue 15001035: Don't make dst copies when color stage requires dst but color writes are disabled. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: alignment 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 | « no previous file | src/gpu/GrDrawState.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrContext.cpp
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index 068f32110e06b4b4d527c188a18d2dd000fc3f91..64893b461a8c91cead73a741a1e4138dda426f38 100644
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -973,12 +973,14 @@ void GrContext::drawRRect(const GrPaint& paint,
GrDrawTarget* target = this->prepareToDraw(&paint, BUFFERED_DRAW);
GrDrawState::AutoStageDisable atr(fDrawState);
- bool prAA = paint.isAntiAlias() && !this->getRenderTarget()->isMultisampled();
+ bool useAA = paint.isAntiAlias() &&
+ !this->getRenderTarget()->isMultisampled() &&
+ !disable_coverage_aa_for_blend(target);
- if (!fOvalRenderer->drawSimpleRRect(target, this, prAA, rect, stroke)) {
+ if (!fOvalRenderer->drawSimpleRRect(target, this, useAA, rect, stroke)) {
SkPath path;
path.addRRect(rect);
- this->internalDrawPath(target, prAA, path, stroke);
+ this->internalDrawPath(target, useAA, path, stroke);
}
}
@@ -991,7 +993,9 @@ void GrContext::drawOval(const GrPaint& paint,
GrDrawTarget* target = this->prepareToDraw(&paint, BUFFERED_DRAW);
GrDrawState::AutoStageDisable atr(fDrawState);
- bool useAA = paint.isAntiAlias() && !this->getRenderTarget()->isMultisampled();
+ bool useAA = paint.isAntiAlias() &&
+ !this->getRenderTarget()->isMultisampled() &&
+ !disable_coverage_aa_for_blend(target);
if (!fOvalRenderer->drawOval(target, this, useAA, oval, stroke)) {
SkPath path;
« no previous file with comments | « no previous file | src/gpu/GrDrawState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698