aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu
diff options
context:
space:
mode:
authorGravatar robertphillips <robertphillips@google.com>2014-10-09 16:43:42 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-10-09 16:43:42 -0700
commit232f6b0f90a02bcdac0c5931d5f9cfd08003b10c (patch)
treea0983734b05c824c4512fad69835baa7189217a1 /src/gpu
parentcbe80caedd43ee37a91c5cf1af6bb63fa0e1528e (diff)
Remove unused SaveLayerInfo::fValid field
Minor code cleanup Review URL: https://codereview.chromium.org/643713002
Diffstat (limited to 'src/gpu')
-rw-r--r--src/gpu/GrLayerHoister.cpp12
-rw-r--r--src/gpu/GrPictureUtils.cpp2
-rw-r--r--src/gpu/GrPictureUtils.h4
3 files changed, 6 insertions, 12 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