Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CC_TEST_DELAYED_RASTER_PICTURE_PILE_IMPL_H_ | |
| 6 #define CC_TEST_DELAYED_RASTER_PICTURE_PILE_IMPL_H_ | |
| 7 | |
| 8 #include "cc/resources/picture_pile_impl.h" | |
| 9 | |
| 10 namespace cc { | |
| 11 | |
| 12 class DelayedRasterTrigger; | |
| 13 | |
| 14 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.
| |
| 15 public: | |
| 16 static scoped_refptr<DelayedRasterPicturePileImpl> CreateFromOther( | |
| 17 PicturePileBase* other, | |
| 18 DelayedRasterTrigger* trigger) { | |
| 19 return new DelayedRasterPicturePileImpl(other, trigger); | |
| 20 } | |
| 21 | |
| 22 // Hi-jack the PlaybackToCanvas method to delay its completion. | |
| 23 void PlaybackToCanvas(SkCanvas* canvas, | |
| 24 const gfx::Rect& canvas_rect, | |
| 25 float contents_scale) const override; | |
| 26 | |
| 27 private: | |
| 28 DelayedRasterPicturePileImpl(PicturePileBase* other, | |
| 29 DelayedRasterTrigger* trigger); | |
| 30 virtual ~DelayedRasterPicturePileImpl(); | |
|
reveman
2014/11/10 23:43:01
~DelayedRasterPicturePileImpl() override;
| |
| 31 | |
| 32 DelayedRasterTrigger* const trigger_; | |
| 33 | |
| 34 DISALLOW_COPY_AND_ASSIGN(DelayedRasterPicturePileImpl); | |
| 35 }; | |
| 36 | |
| 37 } // namespace cc | |
| 38 | |
| 39 #endif // CC_TEST_DELAYED_RASTER_PICTURE_PILE_IMPL_H_ | |
| OLD | NEW |