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

Unified Diff: src/gpu/GrLayerHoister.cpp

Issue 719133002: Rename GrAccelData to SkLayerInfo and move it to src/core (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix up unit test 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/GrPictureUtils.h » ('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 c74913d757108c766b7a0052e06ba1b77aa2d2d4..bc635aea0737b274b0987f422c2c4ddd6c86f10f 100644
--- a/src/gpu/GrLayerHoister.cpp
+++ b/src/gpu/GrLayerHoister.cpp
@@ -11,6 +11,7 @@
#include "SkCanvas.h"
#include "SkGrPixelRef.h"
+#include "SkLayerInfo.h"
#include "SkRecordDraw.h"
#include "SkSurface.h"
@@ -18,7 +19,7 @@
// required texture/render target resources.
static void prepare_for_hoisting(GrLayerCache* layerCache,
const SkPicture* topLevelPicture,
- const GrAccelData::SaveLayerInfo& info,
+ const SkLayerInfo::BlockInfo& info,
const SkIRect& layerRect,
SkTDArray<GrHoistedLayer>* needRendering,
SkTDArray<GrHoistedLayer>* recycled,
@@ -93,22 +94,22 @@ void GrLayerHoister::FindLayersToAtlas(GrContext* context,
layerCache->processDeletedPictures();
- SkPicture::AccelData::Key key = GrAccelData::ComputeAccelDataKey();
+ SkPicture::AccelData::Key key = SkLayerInfo::ComputeKey();
const SkPicture::AccelData* topLevelData = topLevelPicture->EXPERIMENTAL_getAccelData(key);
if (!topLevelData) {
return;
}
- const GrAccelData *topLevelGPUData = static_cast<const GrAccelData*>(topLevelData);
- if (0 == topLevelGPUData->numSaveLayers()) {
+ const SkLayerInfo *topLevelGPUData = static_cast<const SkLayerInfo*>(topLevelData);
+ if (0 == topLevelGPUData->numBlocks()) {
return;
}
- atlased->setReserve(atlased->count() + topLevelGPUData->numSaveLayers());
+ atlased->setReserve(atlased->count() + topLevelGPUData->numBlocks());
- for (int i = 0; i < topLevelGPUData->numSaveLayers(); ++i) {
- const GrAccelData::SaveLayerInfo& info = topLevelGPUData->saveLayerInfo(i);
+ for (int i = 0; i < topLevelGPUData->numBlocks(); ++i) {
+ const SkLayerInfo::BlockInfo& info = topLevelGPUData->block(i);
// TODO: ignore perspective projected layers here?
bool disallowAtlasing = info.fHasNestedLayers || info.fIsNested ||
@@ -145,21 +146,21 @@ void GrLayerHoister::FindLayersToHoist(GrContext* context,
layerCache->processDeletedPictures();
- SkPicture::AccelData::Key key = GrAccelData::ComputeAccelDataKey();
+ SkPicture::AccelData::Key key = SkLayerInfo::ComputeKey();
const SkPicture::AccelData* topLevelData = topLevelPicture->EXPERIMENTAL_getAccelData(key);
if (!topLevelData) {
return;
}
- const GrAccelData *topLevelGPUData = static_cast<const GrAccelData*>(topLevelData);
- if (0 == topLevelGPUData->numSaveLayers()) {
+ const SkLayerInfo *topLevelGPUData = static_cast<const SkLayerInfo*>(topLevelData);
+ if (0 == topLevelGPUData->numBlocks()) {
return;
}
// Find and prepare for hoisting all the layers that intersect the query rect
- for (int i = 0; i < topLevelGPUData->numSaveLayers(); ++i) {
- const GrAccelData::SaveLayerInfo& info = topLevelGPUData->saveLayerInfo(i);
+ for (int i = 0; i < topLevelGPUData->numBlocks(); ++i) {
+ const SkLayerInfo::BlockInfo& info = topLevelGPUData->block(i);
if (info.fIsNested) {
// Parent layers are currently hoisted while nested layers are not.
continue;
« no previous file with comments | « src/gpu/GrLayerHoister.h ('k') | src/gpu/GrPictureUtils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698