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

Unified Diff: src/core/SkRecorder.cpp

Issue 803913005: Remove SkCanvas::isDrawingToLayer (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: init fix 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/SkRecorder.h ('k') | src/pipe/SkGPipeWrite.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkRecorder.cpp
diff --git a/src/core/SkRecorder.cpp b/src/core/SkRecorder.cpp
index 71a1167543bf48dfefc8cc6c5f0821547a548254..7d5d25205ee73dee8708d73631866fe1ddf095b5 100644
--- a/src/core/SkRecorder.cpp
+++ b/src/core/SkRecorder.cpp
@@ -33,13 +33,11 @@ void SkCanvasDrawableList::append(SkCanvasDrawable* drawable) {
SkRecorder::SkRecorder(SkRecord* record, int width, int height)
: SkCanvas(SkIRect::MakeWH(width, height), SkCanvas::kConservativeRasterClip_InitFlag)
- , fRecord(record)
- , fSaveLayerCount(0) {}
+ , fRecord(record) {}
SkRecorder::SkRecorder(SkRecord* record, const SkRect& bounds)
: SkCanvas(bounds.roundOut(), SkCanvas::kConservativeRasterClip_InitFlag)
- , fRecord(record)
- , fSaveLayerCount(0) {}
+ , fRecord(record) {}
void SkRecorder::forgetRecord() {
fDrawableList.reset(NULL);
@@ -273,25 +271,17 @@ void SkRecorder::onDrawPatch(const SkPoint cubics[12], const SkColor colors[4],
}
void SkRecorder::willSave() {
- fSaveIsSaveLayer.push(false);
APPEND(Save);
}
SkCanvas::SaveLayerStrategy SkRecorder::willSaveLayer(const SkRect* bounds,
const SkPaint* paint,
SkCanvas::SaveFlags flags) {
- fSaveLayerCount++;
- fSaveIsSaveLayer.push(true);
APPEND(SaveLayer, this->copy(bounds), this->copy(paint), flags);
return SkCanvas::kNoLayer_SaveLayerStrategy;
}
void SkRecorder::didRestore() {
- SkBool8 saveLayer;
- fSaveIsSaveLayer.pop(&saveLayer);
- if (saveLayer) {
- fSaveLayerCount--;
- }
APPEND(Restore, this->devBounds(), this->getTotalMatrix());
}
@@ -343,10 +333,6 @@ void SkRecorder::endCommentGroup() {
APPEND(EndCommentGroup);
}
-bool SkRecorder::isDrawingToLayer() const {
- return fSaveLayerCount > 0;
-}
-
void SkRecorder::drawData(const void* data, size_t length) {
APPEND(DrawData, copy((const char*)data), length);
}
« no previous file with comments | « src/core/SkRecorder.h ('k') | src/pipe/SkGPipeWrite.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698