| Index: cc/test/fake_picture_pile_impl.h
|
| diff --git a/cc/test/fake_picture_pile_impl.h b/cc/test/fake_picture_pile_impl.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..f3bde7bcc4d649120d1e86ff87f47ff3bc509b8d
|
| --- /dev/null
|
| +++ b/cc/test/fake_picture_pile_impl.h
|
| @@ -0,0 +1,52 @@
|
| +// Copyright 2013 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_FAKE_PICTURE_PILE_IMPL_H_
|
| +#define CC_TEST_FAKE_PICTURE_PILE_IMPL_H_
|
| +
|
| +#include "base/memory/ref_counted.h"
|
| +#include "cc/resources/picture_pile_impl.h"
|
| +#include "cc/test/fake_content_layer_client.h"
|
| +
|
| +namespace cc {
|
| +
|
| +class FakePicturePileImpl : public PicturePileImpl {
|
| + public:
|
| + static scoped_refptr<FakePicturePileImpl> CreateFilledPile(
|
| + gfx::Size tile_size,
|
| + gfx::Size layer_bounds);
|
| +
|
| + static scoped_refptr<FakePicturePileImpl> CreateEmptyPile(
|
| + gfx::Size tile_size,
|
| + gfx::Size layer_bounds);
|
| +
|
| + TilingData& tiling() { return tiling_; }
|
| +
|
| + void AddRecordingAt(int x, int y);
|
| +
|
| + void RemoveRecordingAt(int x, int y);
|
| +
|
| + void add_draw_rect(const gfx::Rect& rect) {
|
| + client_.add_draw_rect(rect, default_paint_);
|
| + }
|
| +
|
| + void add_draw_rect_with_paint(gfx::Rect rect, const SkPaint& paint) {
|
| + client_.add_draw_rect(rect, paint);
|
| + }
|
| +
|
| + void set_default_paint(const SkPaint& paint) {
|
| + default_paint_ = paint;
|
| + }
|
| +
|
| + protected:
|
| + FakePicturePileImpl();
|
| + virtual ~FakePicturePileImpl();
|
| +
|
| + FakeContentLayerClient client_;
|
| + SkPaint default_paint_;
|
| +};
|
| +
|
| +} // namespace cc
|
| +
|
| +#endif // CC_TEST_FAKE_PICTURE_PILE_IMPL_H_
|
|
|