3 * Copyright 2014 Google Inc.
5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file.
9 #ifndef SkPictureRangePlayback_DEFINED
10 #define SkPictureRangePlayback_DEFINED
12 #include "SkPicturePlayback.h"
14 // This version of picture playback plays all the operations between
15 // a pair of start and stop values.
16 // The opcode at 'start' should be a saveLayer while the opcode at
17 // 'stop' should be a restore. Neither of those commands will be issued.
18 // Since this class never uses the bounding box hierarchy, the base class'
19 // useBBH setting is ignored.
20 class SkPictureRangePlayback : public SkPicturePlayback {
22 // Set both start & stop to 0 to disable draw limiting. Note that disabling
23 // draw limiting isn't the same as using the base SkPicturePlayback object
24 // since this class never uses the bounding box hierarchy information.
25 SkPictureRangePlayback(const SkPicture* picture, size_t start, size_t stop)
31 virtual void draw(SkCanvas* canvas, SkDrawPictureCallback*) SK_OVERRIDE;
37 typedef SkPicturePlayback INHERITED;