| Index: cc/test/fake_surface_observer.cc
|
| diff --git a/cc/test/fake_surface_observer.cc b/cc/test/fake_surface_observer.cc
|
| index 0a44e5f8caa46a110de0e93f4a015d46e15f7f58..d5bb3ed7bd6c1318e55ff2a92960ba99362e949e 100644
|
| --- a/cc/test/fake_surface_observer.cc
|
| +++ b/cc/test/fake_surface_observer.cc
|
| @@ -14,6 +14,7 @@ FakeSurfaceObserver::~FakeSurfaceObserver() {}
|
| void FakeSurfaceObserver::Reset() {
|
| last_ack_ = BeginFrameAck();
|
| damaged_surfaces_.clear();
|
| + will_draw_surfaces_.clear();
|
| last_surface_info_ = SurfaceInfo();
|
| last_created_surface_id_ = SurfaceId();
|
| }
|
| @@ -22,6 +23,11 @@ bool FakeSurfaceObserver::IsSurfaceDamaged(const SurfaceId& surface_id) const {
|
| return damaged_surfaces_.count(surface_id) > 0;
|
| }
|
|
|
| +bool FakeSurfaceObserver::SurfaceWillDrawCalled(
|
| + const SurfaceId& surface_id) const {
|
| + return will_draw_surfaces_.count(surface_id) > 0;
|
| +}
|
| +
|
| bool FakeSurfaceObserver::OnSurfaceDamaged(const SurfaceId& surface_id,
|
| const BeginFrameAck& ack) {
|
| if (ack.has_damage)
|
| @@ -30,6 +36,10 @@ bool FakeSurfaceObserver::OnSurfaceDamaged(const SurfaceId& surface_id,
|
| return ack.has_damage && damage_display_;
|
| }
|
|
|
| +void FakeSurfaceObserver::OnSurfaceWillDraw(const SurfaceId& surface_id) {
|
| + will_draw_surfaces_.insert(surface_id);
|
| +}
|
| +
|
| void FakeSurfaceObserver::OnSurfaceCreated(const SurfaceInfo& surface_info) {
|
| last_created_surface_id_ = surface_info.id();
|
| last_surface_info_ = surface_info;
|
|
|