| 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 // Draw an unscaled subset of the source picture. | 65 // Draw an unscaled subset of the source picture. |
| 66 fillRectFiltered(canvas, bounds, pictureSourceSrcRect); | 66 fillRectFiltered(canvas, bounds, pictureSourceSrcRect); |
| 67 canvas->translate(SkIntToScalar(100), 0); | 67 canvas->translate(SkIntToScalar(100), 0); |
| 68 | 68 |
| 69 // Draw the picture to an empty rect (should draw nothing). | 69 // Draw the picture to an empty rect (should draw nothing). |
| 70 fillRectFiltered(canvas, bounds, pictureSourceEmptyRect); | 70 fillRectFiltered(canvas, bounds, pictureSourceEmptyRect); |
| 71 canvas->translate(SkIntToScalar(100), 0); | 71 canvas->translate(SkIntToScalar(100), 0); |
| 72 } | 72 } |
| 73 } | 73 } |
| 74 | 74 |
| 75 // SkPictureImageFilter doesn't support serialization yet. |
| 76 virtual uint32_t onGetFlags() const SK_OVERRIDE { |
| 77 return kSkipPicture_Flag | |
| 78 kSkipPipe_Flag | |
| 79 kSkipPipeCrossProcess_Flag | |
| 80 kSkipTiled_Flag | |
| 81 kSkipScaledReplay_Flag; |
| 82 } |
| 83 |
| 75 private: | 84 private: |
| 76 SkPicture fPicture; | 85 SkPicture fPicture; |
| 77 typedef GM INHERITED; | 86 typedef GM INHERITED; |
| 78 }; | 87 }; |
| 79 | 88 |
| 80 /////////////////////////////////////////////////////////////////////////////// | 89 /////////////////////////////////////////////////////////////////////////////// |
| 81 | 90 |
| 82 DEF_GM( return new PictureImageFilterGM; ) | 91 DEF_GM( return new PictureImageFilterGM; ) |
| OLD | NEW |