DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Implementation

Mercurial (d8847129d134)

VCS Links

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41

/*
 * Copyright 2014 Google Inc.
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

#ifndef SkPictureRangePlayback_DEFINED
#define SkPictureRangePlayback_DEFINED

#include "SkPicturePlayback.h"

// This version of picture playback plays all the operations between
// a pair of start and stop values.
// The opcode at 'start' should be a saveLayer while the opcode at
// 'stop' should be a restore. Neither of those commands will be issued.
// Since this class never uses the bounding box hierarchy, the base class'
// useBBH setting is ignored.
class SkPictureRangePlayback : public SkPicturePlayback {
public:
    // Set both start & stop to 0 to disable draw limiting. Note that disabling
    // draw limiting isn't the same as using the base SkPicturePlayback object
    // since this class never uses the bounding box hierarchy information.
    SkPictureRangePlayback(const SkPicture* picture, size_t start, size_t stop)
    : INHERITED(picture)
    , fStart(start)
    , fStop(stop) {
    }

    virtual void draw(SkCanvas* canvas, SkDrawPictureCallback*) SK_OVERRIDE;

private:
    size_t fStart;
    size_t fStop;

    typedef SkPicturePlayback INHERITED;
};


#endif