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

Unified Diff: src/gpu/GrLayerHoister.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 | « src/gpu/GrLayerHoister.h ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrLayerHoister.cpp
diff --git a/src/gpu/GrLayerHoister.cpp b/src/gpu/GrLayerHoister.cpp
index 5d3a383b474e9ff6f61b193fe13709e5f48e472b..c74913d757108c766b7a0052e06ba1b77aa2d2d4 100644
--- a/src/gpu/GrLayerHoister.cpp
+++ b/src/gpu/GrLayerHoister.cpp
@@ -22,7 +22,8 @@ static void prepare_for_hoisting(GrLayerCache* layerCache,
const SkIRect& layerRect,
SkTDArray<GrHoistedLayer>* needRendering,
SkTDArray<GrHoistedLayer>* recycled,
- bool attemptToAtlas) {
+ bool attemptToAtlas,
+ int numSamples) {
const SkPicture* pict = info.fPicture ? info.fPicture : topLevelPicture;
SkMatrix combined = SkMatrix::Concat(info.fPreMat, info.fLocalMat);
@@ -38,7 +39,7 @@ static void prepare_for_hoisting(GrLayerCache* layerCache,
desc.fWidth = layerRect.width();
desc.fHeight = layerRect.height();
desc.fConfig = kSkia8888_GrPixelConfig;
- // TODO: need to deal with sample count
+ desc.fSampleCnt = numSamples;
bool locked, needsRendering;
if (attemptToAtlas) {
@@ -81,7 +82,13 @@ void GrLayerHoister::FindLayersToAtlas(GrContext* context,
const SkPicture* topLevelPicture,
const SkRect& query,
SkTDArray<GrHoistedLayer>* atlased,
- SkTDArray<GrHoistedLayer>* recycled) {
+ SkTDArray<GrHoistedLayer>* recycled,
+ int numSamples) {
+ if (0 != numSamples) {
+ // MSAA layers are currently never atlased
+ return;
+ }
+
GrLayerCache* layerCache = context->getLayerCache();
layerCache->processDeletedPictures();
@@ -123,7 +130,7 @@ void GrLayerHoister::FindLayersToAtlas(GrContext* context,
continue;
}
- prepare_for_hoisting(layerCache, topLevelPicture, info, ir, atlased, recycled, true);
+ prepare_for_hoisting(layerCache, topLevelPicture, info, ir, atlased, recycled, true, 0);
}
}
@@ -132,7 +139,8 @@ void GrLayerHoister::FindLayersToHoist(GrContext* context,
const SkPicture* topLevelPicture,
const SkRect& query,
SkTDArray<GrHoistedLayer>* needRendering,
- SkTDArray<GrHoistedLayer>* recycled) {
+ SkTDArray<GrHoistedLayer>* recycled,
+ int numSamples) {
GrLayerCache* layerCache = context->getLayerCache();
layerCache->processDeletedPictures();
@@ -166,7 +174,7 @@ void GrLayerHoister::FindLayersToHoist(GrContext* context,
layerRect.roundOut(&ir);
prepare_for_hoisting(layerCache, topLevelPicture, info, ir,
- needRendering, recycled, false);
+ needRendering, recycled, false, numSamples);
}
}
« no previous file with comments | « src/gpu/GrLayerHoister.h ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698