aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/gpu/GrLayerHoister.cpp12
-rw-r--r--src/gpu/GrPictureUtils.cpp2
-rw-r--r--src/gpu/GrPictureUtils.h4
-rw-r--r--tests/PictureTest.cpp8
4 files changed, 6 insertions, 20 deletions
diff --git a/src/gpu/GrLayerHoister.cpp b/src/gpu/GrLayerHoister.cpp
index 6c5398b902..00e8b99f45 100644
--- a/src/gpu/GrLayerHoister.cpp
+++ b/src/gpu/GrLayerHoister.cpp
@@ -16,11 +16,11 @@
// Create the layer information for the hoisted layer and secure the
// required texture/render target resources.
static void prepare_for_hoisting(GrLayerCache* layerCache,
- const SkPicture* topLevelPicture,
- const GrAccelData::SaveLayerInfo& info,
- SkTDArray<GrHoistedLayer>* atlased,
- SkTDArray<GrHoistedLayer>* nonAtlased,
- SkTDArray<GrHoistedLayer>* recycled) {
+ const SkPicture* topLevelPicture,
+ const GrAccelData::SaveLayerInfo& info,
+ SkTDArray<GrHoistedLayer>* atlased,
+ SkTDArray<GrHoistedLayer>* nonAtlased,
+ SkTDArray<GrHoistedLayer>* recycled) {
const SkPicture* pict = info.fPicture ? info.fPicture : topLevelPicture;
GrCachedLayer* layer = layerCache->findLayerOrCreate(pict->uniqueID(),
@@ -113,7 +113,7 @@ bool GrLayerHoister::FindLayersToHoist(GrContext* context,
// TODO: ignore perspective projected layers here!
// TODO: once this code is more stable unsuitable layers can
// just be omitted during the optimization stage
- if (!info.fValid || info.fIsNested) {
+ if (info.fIsNested) {
continue;
}
diff --git a/src/gpu/GrPictureUtils.cpp b/src/gpu/GrPictureUtils.cpp
index 6aeda2032d..da238cef9f 100644
--- a/src/gpu/GrPictureUtils.cpp
+++ b/src/gpu/GrPictureUtils.cpp
@@ -120,7 +120,6 @@ private:
GrAccelData::SaveLayerInfo& dst = fAccelData->addSaveLayerInfo();
- dst.fValid = true;
// If src.fPicture is NULL the layer is in dp.picture; otherwise
// it belongs to a sub-picture.
dst.fPicture = src.fPicture ? src.fPicture : static_cast<const SkPicture*>(dp.picture);
@@ -181,7 +180,6 @@ private:
GrAccelData::SaveLayerInfo& slInfo = fAccelData->addSaveLayerInfo();
- slInfo.fValid = true;
SkASSERT(NULL == slInfo.fPicture); // This layer is in the top-most picture
slInfo.fSize = SkISize::Make(si.fBounds.width(), si.fBounds.height());
slInfo.fOffset = SkIPoint::Make(si.fBounds.fLeft, si.fBounds.fTop);
diff --git a/src/gpu/GrPictureUtils.h b/src/gpu/GrPictureUtils.h
index f9bab805d9..07c32ded1b 100644
--- a/src/gpu/GrPictureUtils.h
+++ b/src/gpu/GrPictureUtils.h
@@ -21,10 +21,6 @@ public:
SaveLayerInfo() : fPicture(NULL), fPaint(NULL) {}
~SaveLayerInfo() { SkSafeUnref(fPicture); SkDELETE(fPaint); }
- // True if the SaveLayerInfo is valid. False if 'fOffset' is
- // invalid (due to a non-invertible CTM).
- // TODO: remove fValid
- bool fValid;
// The picture owning the layer. If the owning picture is the top-most
// one (i.e., the picture for which this GrAccelData was created) then
// this pointer is NULL. If it is a nested picture then the pointer
diff --git a/tests/PictureTest.cpp b/tests/PictureTest.cpp
index db28224ee1..b539d06403 100644
--- a/tests/PictureTest.cpp
+++ b/tests/PictureTest.cpp
@@ -980,7 +980,6 @@ static void test_gpu_picture_optimization(skiatest::Reporter* reporter,
const GrAccelData::SaveLayerInfo& info6 = gpuData->saveLayerInfo(7);
const GrAccelData::SaveLayerInfo& info7 = gpuData->saveLayerInfo(6);
- REPORTER_ASSERT(reporter, info0.fValid);
REPORTER_ASSERT(reporter, NULL == info0.fPicture);
REPORTER_ASSERT(reporter, kWidth == info0.fSize.fWidth &&
kHeight == info0.fSize.fHeight);
@@ -989,7 +988,6 @@ static void test_gpu_picture_optimization(skiatest::Reporter* reporter,
REPORTER_ASSERT(reporter, NULL == info0.fPaint);
REPORTER_ASSERT(reporter, !info0.fIsNested && !info0.fHasNestedLayers);
- REPORTER_ASSERT(reporter, info1.fValid);
REPORTER_ASSERT(reporter, NULL == info1.fPicture);
REPORTER_ASSERT(reporter, kWidth == info1.fSize.fWidth &&
kHeight == info1.fSize.fHeight);
@@ -999,7 +997,6 @@ static void test_gpu_picture_optimization(skiatest::Reporter* reporter,
REPORTER_ASSERT(reporter, !info1.fIsNested &&
info1.fHasNestedLayers); // has a nested SL
- REPORTER_ASSERT(reporter, info2.fValid);
REPORTER_ASSERT(reporter, NULL == info2.fPicture);
REPORTER_ASSERT(reporter, kWidth / 2 == info2.fSize.fWidth &&
kHeight/2 == info2.fSize.fHeight); // bound reduces size
@@ -1009,7 +1006,6 @@ static void test_gpu_picture_optimization(skiatest::Reporter* reporter,
REPORTER_ASSERT(reporter, NULL == info1.fPaint);
REPORTER_ASSERT(reporter, info2.fIsNested && !info2.fHasNestedLayers); // is nested
- REPORTER_ASSERT(reporter, info3.fValid);
REPORTER_ASSERT(reporter, NULL == info3.fPicture);
REPORTER_ASSERT(reporter, kWidth == info3.fSize.fWidth &&
kHeight == info3.fSize.fHeight);
@@ -1018,7 +1014,6 @@ static void test_gpu_picture_optimization(skiatest::Reporter* reporter,
REPORTER_ASSERT(reporter, info3.fPaint);
REPORTER_ASSERT(reporter, !info3.fIsNested && !info3.fHasNestedLayers);
- REPORTER_ASSERT(reporter, info4.fValid);
REPORTER_ASSERT(reporter, NULL == info4.fPicture);
REPORTER_ASSERT(reporter, kWidth == info4.fSize.fWidth &&
kHeight == info4.fSize.fHeight);
@@ -1028,7 +1023,6 @@ static void test_gpu_picture_optimization(skiatest::Reporter* reporter,
REPORTER_ASSERT(reporter, !info4.fIsNested &&
info4.fHasNestedLayers); // has a nested SL
- REPORTER_ASSERT(reporter, info5.fValid);
REPORTER_ASSERT(reporter, child == info5.fPicture); // in a child picture
REPORTER_ASSERT(reporter, kWidth == info5.fSize.fWidth &&
kHeight == info5.fSize.fHeight);
@@ -1037,7 +1031,6 @@ static void test_gpu_picture_optimization(skiatest::Reporter* reporter,
REPORTER_ASSERT(reporter, NULL == info5.fPaint);
REPORTER_ASSERT(reporter, info5.fIsNested && !info5.fHasNestedLayers); // is nested
- REPORTER_ASSERT(reporter, info6.fValid);
REPORTER_ASSERT(reporter, NULL == info6.fPicture);
REPORTER_ASSERT(reporter, kWidth == info6.fSize.fWidth &&
kHeight == info6.fSize.fHeight);
@@ -1047,7 +1040,6 @@ static void test_gpu_picture_optimization(skiatest::Reporter* reporter,
REPORTER_ASSERT(reporter, !info6.fIsNested &&
info6.fHasNestedLayers); // has a nested SL
- REPORTER_ASSERT(reporter, info7.fValid);
REPORTER_ASSERT(reporter, child == info7.fPicture); // in a child picture
REPORTER_ASSERT(reporter, kWidth == info7.fSize.fWidth &&
kHeight == info7.fSize.fHeight);