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

Unified Diff: src/effects/SkLayerDrawLooper.cpp

Issue 232913003: Make sure SkDrawLooper objects can only be allocated on the heap. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 6 years, 8 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/effects/SkBlurDrawLooper.cpp ('k') | tests/PaintTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkLayerDrawLooper.cpp
diff --git a/src/effects/SkLayerDrawLooper.cpp b/src/effects/SkLayerDrawLooper.cpp
index 962ca293d8418fc416f6e2d34b21c315f2982e93..5fbb550f7543bfb9f605cbe027886a49d2be57da 100644
--- a/src/effects/SkLayerDrawLooper.cpp
+++ b/src/effects/SkLayerDrawLooper.cpp
@@ -36,44 +36,6 @@ SkLayerDrawLooper::~SkLayerDrawLooper() {
}
}
-SkPaint* SkLayerDrawLooper::addLayer(const LayerInfo& info) {
- fCount += 1;
-
- Rec* rec = SkNEW(Rec);
- rec->fNext = fRecs;
- rec->fInfo = info;
- fRecs = rec;
- if (NULL == fTopRec) {
- fTopRec = rec;
- }
-
- return &rec->fPaint;
-}
-
-void SkLayerDrawLooper::addLayer(SkScalar dx, SkScalar dy) {
- LayerInfo info;
-
- info.fOffset.set(dx, dy);
- (void)this->addLayer(info);
-}
-
-SkPaint* SkLayerDrawLooper::addLayerOnTop(const LayerInfo& info) {
- fCount += 1;
-
- Rec* rec = SkNEW(Rec);
- rec->fNext = NULL;
- rec->fInfo = info;
- if (NULL == fRecs) {
- fRecs = rec;
- } else {
- SkASSERT(NULL != fTopRec);
- fTopRec->fNext = rec;
- }
- fTopRec = rec;
-
- return &rec->fPaint;
-}
-
SkLayerDrawLooper::Context* SkLayerDrawLooper::createContext(SkCanvas* canvas, void* storage) const {
canvas->save(SkCanvas::kMatrix_SaveFlag);
return SkNEW_PLACEMENT_ARGS(storage, LayerDrawLooperContext, (this));
« no previous file with comments | « src/effects/SkBlurDrawLooper.cpp ('k') | tests/PaintTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698