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

Unified Diff: src/core/SkRecordDraw.cpp

Issue 790643009: Revert of Fix layer hoisting image filter corner cases (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years 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/core/SkLayerInfo.h ('k') | src/gpu/GrLayerCache.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkRecordDraw.cpp
diff --git a/src/core/SkRecordDraw.cpp b/src/core/SkRecordDraw.cpp
index 6a2a5e3677b4395b980f6e0b23b110ddafc5fd89..86621f2170fc8d09afe48ac9274279945bdba8af 100644
--- a/src/core/SkRecordDraw.cpp
+++ b/src/core/SkRecordDraw.cpp
@@ -608,26 +608,24 @@
private:
struct SaveLayerInfo {
SaveLayerInfo() { }
- SaveLayerInfo(int opIndex, bool isSaveLayer, const SkRect* bounds, const SkPaint* paint)
+ SaveLayerInfo(int opIndex, bool isSaveLayer, const SkPaint* paint)
: fStartIndex(opIndex)
, fIsSaveLayer(isSaveLayer)
, fHasNestedSaveLayer(false)
- , fBounds(bounds ? *bounds : SkRect::MakeEmpty())
, fPaint(paint) {
}
int fStartIndex;
bool fIsSaveLayer;
bool fHasNestedSaveLayer;
- SkRect fBounds;
const SkPaint* fPaint;
};
template <typename T> void trackSaveLayers(const T& op) {
/* most ops aren't involved in saveLayers */
}
- void trackSaveLayers(const Save& s) { this->pushSaveLayerInfo(false, NULL, NULL); }
- void trackSaveLayers(const SaveLayer& sl) { this->pushSaveLayerInfo(true, sl.bounds, sl.paint); }
+ void trackSaveLayers(const Save& s) { this->pushSaveLayerInfo(false, NULL); }
+ void trackSaveLayers(const SaveLayer& sl) { this->pushSaveLayerInfo(true, sl.paint); }
void trackSaveLayers(const Restore& r) { this->popSaveLayerInfo(); }
void trackSaveLayersForPicture(const SkPicture* picture, const SkPaint* paint) {
@@ -664,7 +662,6 @@
dst.fPicture = src.fPicture ? src.fPicture : picture;
dst.fPicture->ref();
dst.fBounds = newBound;
- dst.fSrcBounds = src.fSrcBounds;
dst.fLocalMat = src.fLocalMat;
dst.fPreMat = src.fPreMat;
dst.fPreMat.postConcat(fFillBounds.ctm());
@@ -710,14 +707,14 @@
}
}
- void pushSaveLayerInfo(bool isSaveLayer, const SkRect* bounds, const SkPaint* paint) {
+ void pushSaveLayerInfo(bool isSaveLayer, const SkPaint* paint) {
if (isSaveLayer) {
this->updateStackForSaveLayer();
++fSaveLayersInStack;
fSaveLayerOpStack.push(fFillBounds.currentOp());
}
- fSaveLayerStack.push(SaveLayerInfo(fFillBounds.currentOp(), isSaveLayer, bounds, paint));
+ fSaveLayerStack.push(SaveLayerInfo(fFillBounds.currentOp(), isSaveLayer, paint));
}
void popSaveLayerInfo() {
@@ -747,8 +744,6 @@
if (sli.fPaint) {
block.fPaint = SkNEW_ARGS(SkPaint, (*sli.fPaint));
}
-
- block.fSrcBounds = sli.fBounds;
block.fSaveLayerOpID = sli.fStartIndex;
block.fRestoreOpID = fFillBounds.currentOp();
block.fHasNestedLayers = sli.fHasNestedSaveLayer;
« no previous file with comments | « src/core/SkLayerInfo.h ('k') | src/gpu/GrLayerCache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698