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

Unified Diff: src/core/SkMultiPictureDraw.cpp

Issue 709943003: Address MSAA rendering in layer hoisting (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 1 month 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/GrLayerCache.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkMultiPictureDraw.cpp
diff --git a/src/core/SkMultiPictureDraw.cpp b/src/core/SkMultiPictureDraw.cpp
index fe41243d6b3ab2b111f84d8c33a689dd4828d998..0e21b5c54aa85f15d510aaead644ef812941c938 100644
--- a/src/core/SkMultiPictureDraw.cpp
+++ b/src/core/SkMultiPictureDraw.cpp
@@ -16,6 +16,7 @@
#if SK_SUPPORT_GPU
#include "GrLayerHoister.h"
#include "GrRecordReplaceDraw.h"
+#include "GrRenderTarget.h"
#endif
void SkMultiPictureDraw::DrawData::draw() {
@@ -120,13 +121,17 @@ void SkMultiPictureDraw::draw() {
continue;
}
+ GrRenderTarget* rt = data.fCanvas->internal_private_accessTopLayerRenderTarget();
+ SkASSERT(rt);
+
// TODO: sorting the cacheable layers from smallest to largest
// would improve the packing and reduce the number of swaps
// TODO: another optimization would be to make a first pass to
// lock any required layer that is already in the atlas
GrLayerHoister::FindLayersToAtlas(context, data.fPicture,
clipBounds,
- &atlasedNeedRendering, &atlasedRecycled);
+ &atlasedNeedRendering, &atlasedRecycled,
+ rt->numSamples());
}
}
@@ -148,10 +153,14 @@ void SkMultiPictureDraw::draw() {
continue;
}
+ GrRenderTarget* rt = data.fCanvas->internal_private_accessTopLayerRenderTarget();
+ SkASSERT(rt);
+
// Find the layers required by this canvas. It will return atlased
// layers in the 'recycled' list since they have already been drawn.
GrLayerHoister::FindLayersToHoist(context, picture,
- clipBounds, &needRendering, &recycled);
+ clipBounds, &needRendering, &recycled,
+ rt->numSamples());
GrLayerHoister::DrawLayers(context, needRendering);
« no previous file with comments | « no previous file | src/gpu/GrLayerCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698