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

Unified Diff: src/gpu/GrDrawContext.cpp

Issue 1001503002: Implement support for mixed sampled render targets (Closed) Base URL: https://skia.googlesource.com/skia.git@mix1
Patch Set: Fix build error related to isMultisamped renaming Created 5 years, 6 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/GrContext.cpp ('k') | src/gpu/GrGpu.cpp » ('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 92a1e36f1881b1015e732b9c2dbda7642253615c..23c349ba173a0912e8af1f85ceae1044251adb1c 100644
--- a/src/gpu/GrDrawContext.cpp
+++ b/src/gpu/GrDrawContext.cpp
@@ -156,7 +156,7 @@ static bool apply_aa_to_rect(GrDrawTarget* target,
SkScalar strokeWidth,
const SkMatrix& combinedMatrix,
GrColor color) {
- if (pipelineBuilder->getRenderTarget()->isMultisampled()) {
+ if (pipelineBuilder->getRenderTarget()->isUnifiedMultisampled()) {
return false;
}
@@ -422,7 +422,8 @@ void GrDrawContext::drawRect(GrRenderTarget* rt,
GrColor color = paint.getColor();
SkRect devBoundRect;
- bool needAA = paint.isAntiAlias() && !pipelineBuilder.getRenderTarget()->isMultisampled();
+ bool needAA = paint.isAntiAlias() &&
+ !pipelineBuilder.getRenderTarget()->isUnifiedMultisampled();
bool doAA = needAA && apply_aa_to_rect(fDrawTarget, &pipelineBuilder, &devBoundRect, rect,
width, viewMatrix, color);
@@ -455,7 +456,7 @@ void GrDrawContext::drawRect(GrRenderTarget* rt,
geometry.fStrokeWidth = width;
// Non-AA hairlines are snapped to pixel centers to make which pixels are hit deterministic
- bool snapToPixelCenters = (0 == width && !rt->isMultisampled());
+ bool snapToPixelCenters = (0 == width && !rt->isUnifiedMultisampled());
SkAutoTUnref<GrBatch> batch(StrokeRectBatch::Create(geometry, snapToPixelCenters));
// Depending on sub-pixel coordinates and the particular GPU, we may lose a corner of
@@ -1014,7 +1015,7 @@ void GrDrawContext::drawPath(GrRenderTarget* rt,
if (!strokeInfo.isDashed()) {
bool useCoverageAA = paint.isAntiAlias() &&
- !pipelineBuilder.getRenderTarget()->isMultisampled();
+ !pipelineBuilder.getRenderTarget()->isUnifiedMultisampled();
if (useCoverageAA && strokeInfo.getWidth() < 0 && !path.isConvex()) {
// Concave AA paths are expensive - try to avoid them for special cases
@@ -1062,7 +1063,7 @@ void GrDrawContext::internalDrawPath(GrDrawTarget* target,
// aa. If we have some future driver-mojo path AA that can do the right
// thing WRT to the blend then we'll need some query on the PR.
bool useCoverageAA = useAA &&
- !pipelineBuilder->getRenderTarget()->isMultisampled();
+ !pipelineBuilder->getRenderTarget()->isUnifiedMultisampled();
GrPathRendererChain::DrawType type =
« no previous file with comments | « src/gpu/GrContext.cpp ('k') | src/gpu/GrGpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698