Renaming SkCanvas::fLayerCount to fSaveLayerCount for readability
REVIEW=http://codereview.appspot.com/5992047/ git-svn-id: http://skia.googlecode.com/svn/trunk@3619 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
3a4553ea57
commit
b0a7ace7cb
@ -968,7 +968,7 @@ private:
|
||||
|
||||
SkBounder* fBounder;
|
||||
SkDevice* fLastDeviceToGainFocus;
|
||||
int fLayerCount; // number of successful saveLayer calls
|
||||
int fSaveLayerCount; // number of successful saveLayer calls
|
||||
|
||||
void prepareForDeviceDraw(SkDevice*, const SkMatrix&, const SkRegion&,
|
||||
const SkClipStack& clipStack);
|
||||
|
@ -439,7 +439,7 @@ SkDevice* SkCanvas::init(SkDevice* device) {
|
||||
fLocalBoundsCompareTypeDirtyBW = true;
|
||||
fLastDeviceToGainFocus = NULL;
|
||||
fDeviceCMDirty = false;
|
||||
fLayerCount = 0;
|
||||
fSaveLayerCount = 0;
|
||||
|
||||
fMCRec = (MCRec*)fMCStack.push_back();
|
||||
new (fMCRec) MCRec(NULL, 0);
|
||||
@ -479,7 +479,7 @@ SkCanvas::SkCanvas(const SkBitmap& bitmap)
|
||||
SkCanvas::~SkCanvas() {
|
||||
// free up the contents of our deque
|
||||
this->restoreToCount(1); // restore everything but the last
|
||||
SkASSERT(0 == fLayerCount);
|
||||
SkASSERT(0 == fSaveLayerCount);
|
||||
|
||||
this->internalRestore(); // restore the last, since we're going away
|
||||
|
||||
@ -831,7 +831,7 @@ int SkCanvas::internalSaveLayer(const SkRect* bounds, const SkPaint* paint,
|
||||
fMCRec->fLayer = layer;
|
||||
fMCRec->fTopLayer = layer; // this field is NOT an owner of layer
|
||||
|
||||
fLayerCount += 1;
|
||||
fSaveLayerCount += 1;
|
||||
return count;
|
||||
}
|
||||
|
||||
@ -883,8 +883,8 @@ void SkCanvas::internalRestore() {
|
||||
// reset this, since internalDrawDevice will have set it to true
|
||||
fDeviceCMDirty = true;
|
||||
|
||||
SkASSERT(fLayerCount > 0);
|
||||
fLayerCount -= 1;
|
||||
SkASSERT(fSaveLayerCount > 0);
|
||||
fSaveLayerCount -= 1;
|
||||
}
|
||||
SkDELETE(layer);
|
||||
}
|
||||
@ -909,7 +909,7 @@ void SkCanvas::restoreToCount(int count) {
|
||||
}
|
||||
|
||||
bool SkCanvas::isDrawingToLayer() const {
|
||||
return fLayerCount > 0;
|
||||
return fSaveLayerCount > 0;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
Loading…
Reference in New Issue
Block a user