Chromium Code Reviews| Index: cc/test/delayed_raster_picture_pile_impl.h |
| diff --git a/cc/test/delayed_raster_picture_pile_impl.h b/cc/test/delayed_raster_picture_pile_impl.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..20f63c7ec91edeba099300c5834667db983c0a6c |
| --- /dev/null |
| +++ b/cc/test/delayed_raster_picture_pile_impl.h |
| @@ -0,0 +1,39 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CC_TEST_DELAYED_RASTER_PICTURE_PILE_IMPL_H_ |
| +#define CC_TEST_DELAYED_RASTER_PICTURE_PILE_IMPL_H_ |
| + |
| +#include "cc/resources/picture_pile_impl.h" |
| + |
| +namespace cc { |
| + |
| +class DelayedRasterTrigger; |
| + |
| +class DelayedRasterPicturePileImpl : public PicturePileImpl { |
|
reveman
2014/11/10 23:43:01
Did you consider adding this functionality to Fake
danakj
2014/11/12 20:19:39
Done.
|
| + public: |
| + static scoped_refptr<DelayedRasterPicturePileImpl> CreateFromOther( |
| + PicturePileBase* other, |
| + DelayedRasterTrigger* trigger) { |
| + return new DelayedRasterPicturePileImpl(other, trigger); |
| + } |
| + |
| + // Hi-jack the PlaybackToCanvas method to delay its completion. |
| + void PlaybackToCanvas(SkCanvas* canvas, |
| + const gfx::Rect& canvas_rect, |
| + float contents_scale) const override; |
| + |
| + private: |
| + DelayedRasterPicturePileImpl(PicturePileBase* other, |
| + DelayedRasterTrigger* trigger); |
| + virtual ~DelayedRasterPicturePileImpl(); |
|
reveman
2014/11/10 23:43:01
~DelayedRasterPicturePileImpl() override;
|
| + |
| + DelayedRasterTrigger* const trigger_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(DelayedRasterPicturePileImpl); |
| +}; |
| + |
| +} // namespace cc |
| + |
| +#endif // CC_TEST_DELAYED_RASTER_PICTURE_PILE_IMPL_H_ |