| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "gm.h" | 8 #include "gm.h" |
| 9 | 9 |
| 10 #include "SkPictureImageFilter.h" | 10 #include "SkPictureImageFilter.h" |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 // Draw the picture scaled, but rasterized at original resolution | 94 // Draw the picture scaled, but rasterized at original resolution |
| 95 canvas->translate(srcRect.width(), 0); | 95 canvas->translate(srcRect.width(), 0); |
| 96 fillRectFiltered(canvas, srcRect, pictureSourceResampled); | 96 fillRectFiltered(canvas, srcRect, pictureSourceResampled); |
| 97 | 97 |
| 98 // Draw the picture scaled, pixelated | 98 // Draw the picture scaled, pixelated |
| 99 canvas->translate(srcRect.width(), 0); | 99 canvas->translate(srcRect.width(), 0); |
| 100 fillRectFiltered(canvas, srcRect, pictureSourcePixelated); | 100 fillRectFiltered(canvas, srcRect, pictureSourcePixelated); |
| 101 } | 101 } |
| 102 } | 102 } |
| 103 | 103 |
| 104 // SkPictureImageFilter doesn't support serialization yet. | |
| 105 uint32_t onGetFlags() const SK_OVERRIDE { | |
| 106 return kSkipPicture_Flag | | |
| 107 kSkipPipe_Flag | | |
| 108 kSkipPipeCrossProcess_Flag | | |
| 109 kSkipTiled_Flag | | |
| 110 kSkipScaledReplay_Flag; | |
| 111 } | |
| 112 | |
| 113 private: | 104 private: |
| 114 SkAutoTUnref<SkPicture> fPicture; | 105 SkAutoTUnref<SkPicture> fPicture; |
| 115 typedef GM INHERITED; | 106 typedef GM INHERITED; |
| 116 }; | 107 }; |
| 117 | 108 |
| 118 /////////////////////////////////////////////////////////////////////////////// | 109 /////////////////////////////////////////////////////////////////////////////// |
| 119 | 110 |
| 120 DEF_GM( return new PictureImageFilterGM; ) | 111 DEF_GM( return new PictureImageFilterGM; ) |
| OLD | NEW |