SkCanvas::SaveLayerStrategy ReplayingCanvas::willSaveLayer(const SkRect* bounds, const SkPaint* paint, SaveFlags flags) { // We're about to create a layer and we have not cleared the device yet. // Let's clear now, so it has effect on all layers. if (callCount() <= m_fromStep) this->SkCanvas::clear(SkColorSetARGB(255, 255, 255, 255)); // FIXME: fill with nine patch instead. return this->InterceptingCanvas<ReplayingCanvas>::willSaveLayer(bounds, paint, flags); }
SkCanvas::SaveLayerStrategy ReplayingCanvas::getSaveLayerStrategy(const SaveLayerRec& rec) { // We're about to create a layer and we have not cleared the device yet. // Let's clear now, so it has effect on all layers. if (callCount() <= m_fromStep) this->SkCanvas::clear(SkColorSetARGB(255, 255, 255, 255)); // FIXME: fill with nine patch instead. return this->InterceptingCanvas<ReplayingCanvas>::getSaveLayerStrategy(rec); }
void ReplayingCanvas::updateInRange() { if (m_abortDrawing) return; unsigned step = callCount() + 1; if (m_toStep && step > m_toStep) m_abortDrawing = true; if (step == m_fromStep) this->SkCanvas::clear(SkColorSetARGB(255, 255, 255, 255)); // FIXME: fill with nine patch instead. }