Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(763)

Side by Side Diff: gm/pictureimagefilter.cpp

Issue 114263002: Implement an SkPicture image filter source. This is required for the external-SVG reference feature… (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Skip serialization modes Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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; )
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698