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

Side by Side Diff: src/core/SkPictureRangePlayback.h

Issue 374833006: Split SkPictureRangePlayback out of SkPicturePlayback (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Addressed code review comments Created 6 years, 5 months 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
« no previous file with comments | « src/core/SkPicturePlayback.cpp ('k') | src/core/SkPictureRangePlayback.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright 2014 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 #ifndef SkPictureRangePlayback_DEFINED
9 #define SkPictureRangePlayback_DEFINED
10
11 #include "SkPicturePlayback.h"
12
13 // This version of picture playback plays all the operations between
14 // a pair of start and stop values.
15 // The opcode at 'start' should be a saveLayer while the opcode at
16 // 'stop' should be a restore. Neither of those commands will be issued.
17 // Since this class never uses the bounding box hierarchy, the base class'
18 // useBBH setting is ignored.
19 class SkPictureRangePlayback : public SkPicturePlayback {
20 public:
21 // Set both start & stop to 0 to disable draw limiting. Note that disabling
22 // draw limiting isn't the same as using the base SkPicturePlayback object
23 // since this class never uses the bounding box hierarchy information.
24 SkPictureRangePlayback(const SkPicture* picture, size_t start, size_t stop)
25 : INHERITED(picture)
26 , fStart(start)
27 , fStop(stop) {
28 }
29
30 virtual void draw(SkCanvas* canvas, SkDrawPictureCallback*) SK_OVERRIDE;
31
32 private:
33 size_t fStart;
34 size_t fStop;
35
36 typedef SkPicturePlayback INHERITED;
37 };
38
39
40 #endif
OLDNEW
« no previous file with comments | « src/core/SkPicturePlayback.cpp ('k') | src/core/SkPictureRangePlayback.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698