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

Unified Diff: src/core/SkBBoxRecord.cpp

Issue 381353005: Revert "Fix for saveLayer() with filters vs. the BBox Hierarchy." and (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 5 months 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/SkBBoxRecord.h ('k') | tests/ImageFilterTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkBBoxRecord.cpp
diff --git a/src/core/SkBBoxRecord.cpp b/src/core/SkBBoxRecord.cpp
index 3670f9145e8bcf7581dea8d4c7f6ff98ccab3ecc..a40ea8ba0d27e531e997dfaa922488e0c19433a3 100644
--- a/src/core/SkBBoxRecord.cpp
+++ b/src/core/SkBBoxRecord.cpp
@@ -8,13 +8,6 @@
#include "SkBBoxRecord.h"
-SkBBoxRecord::~SkBBoxRecord() {
- while (!fSaveStack.empty()) {
- delete fSaveStack.top();
- fSaveStack.pop();
- }
-}
-
void SkBBoxRecord::drawOval(const SkRect& rect, const SkPaint& paint) {
if (this->transformBounds(rect, &paint)) {
INHERITED::drawOval(rect, paint);
@@ -294,26 +287,6 @@ void SkBBoxRecord::onDrawPicture(const SkPicture* picture) {
}
}
-void SkBBoxRecord::willSave() {
- fSaveStack.push(NULL);
- this->INHERITED::willSave();
-}
-
-SkCanvas::SaveLayerStrategy SkBBoxRecord::willSaveLayer(const SkRect* bounds,
- const SkPaint* paint,
- SaveFlags flags) {
- // Image filters can affect the effective bounds of primitives drawn inside saveLayer().
- // Copy the paint so we can compute the modified bounds in transformBounds().
- fSaveStack.push(paint && paint->getImageFilter() ? new SkPaint(*paint) : NULL);
- return this->INHERITED::willSaveLayer(bounds, paint, flags);
-}
-
-void SkBBoxRecord::willRestore() {
- delete fSaveStack.top();
- fSaveStack.pop();
- this->INHERITED::willRestore();
-}
-
bool SkBBoxRecord::transformBounds(const SkRect& bounds, const SkPaint* paint) {
SkRect outBounds = bounds;
outBounds.sort();
@@ -332,14 +305,6 @@ bool SkBBoxRecord::transformBounds(const SkRect& bounds, const SkPaint* paint) {
}
}
- for (int i = fSaveStack.count() - 1; i >= 0; --i) {
- const SkPaint* paint = fSaveStack.index(i);
- if (paint && paint->canComputeFastBounds()) {
- SkRect temp;
- outBounds = paint->computeFastBounds(outBounds, &temp);
- }
- }
-
if (!outBounds.isEmpty() && !this->quickReject(outBounds)) {
this->getTotalMatrix().mapRect(&outBounds);
this->handleBBox(outBounds);
« no previous file with comments | « src/core/SkBBoxRecord.h ('k') | tests/ImageFilterTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698