install drawfilter for the picture playback as well
authorreed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Thu, 8 Dec 2011 19:36:00 +0000 (19:36 +0000)
committerreed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Thu, 8 Dec 2011 19:36:00 +0000 (19:36 +0000)
git-svn-id: http://skia.googlecode.com/svn/trunk@2839 2bbb7eff-a529-9590-31e7-b0007b416f81

samplecode/SampleApp.cpp
samplecode/SampleApp.h

index cc69578..52ddd0f 100644 (file)
@@ -1052,6 +1052,7 @@ void SampleWindow::afterChildren(SkCanvas* orig) {
         if (true) {
             SkPicture* pict = new SkPicture(*fPicture);
             fPicture->unref();
+            this->installDrawFilter(orig);
             orig->drawPicture(*pict);
             pict->unref();
         } else if (true) {
@@ -1141,8 +1142,7 @@ void SampleWindow::beforeChild(SkView* child, SkCanvas* canvas) {
         canvas->concat(m);
     }
 
-    canvas->setDrawFilter(new FlagsDrawFilter(fLCDState, fAAState,
-                                       fFilterState, fHintingState))->unref();
+    this->installDrawFilter(canvas);
 
     if (fMeasureFPS) {
         fMeasureFPS_Time = 0;   // 0 means the child is not aware of repeat-draw
@@ -1263,11 +1263,17 @@ void SampleWindow::showOverview() {
                                      4));
 }
 
+void SampleWindow::installDrawFilter(SkCanvas* canvas) {
+    canvas->setDrawFilter(new FlagsDrawFilter(fLCDState, fAAState,
+                                              fFilterState, fHintingState))->unref();
+}
+
 void SampleWindow::postAnimatingEvent() {
     if (fAnimating) {
         (new SkEvent(ANIMATING_EVENTTYPE, this->getSinkID()))->postDelay(ANIMATING_DELAY);
     }
 }
+
 bool SampleWindow::onEvent(const SkEvent& evt) {
     if (evt.isType(gUpdateWindowTitleEvtName)) {
         this->updateTitle();
index 0a60535..cd07206 100644 (file)
@@ -189,6 +189,7 @@ private:
     void showZoomer(SkCanvas* canvas);
     void updateMatrix();
     void postAnimatingEvent();
+    void installDrawFilter(SkCanvas*);
 
     typedef SkOSWindow INHERITED;
 };