Chromium Code Reviews| Index: cc/test/fake_output_surface.cc |
| diff --git a/cc/test/fake_output_surface.cc b/cc/test/fake_output_surface.cc |
| index 920b68940c7aea80b23534c60436050206a5b537..341c5f522a6c22c9febc2490db301e3850cc37a6 100644 |
| --- a/cc/test/fake_output_surface.cc |
| +++ b/cc/test/fake_output_surface.cc |
| @@ -63,6 +63,12 @@ FakeOutputSurface::FakeOutputSurface( |
| FakeOutputSurface::~FakeOutputSurface() {} |
| void FakeOutputSurface::SwapBuffers(CompositorFrame* frame) { |
| + // In unit tests we sometimes lose the context synchronously during a draw, |
| + // so we abort the swap here if that's the case. Real implementations of |
| + // OutputSurface should DCHECK that is_lost_ is false. |
| + if (is_lost_) |
|
brianderson
2014/04/12 00:09:58
I decided to DCHECK for all other OutputSurface im
danakj
2014/04/14 18:14:51
Hm, there's no point in a unit test that can't hap
brianderson
2014/04/16 22:41:53
I'm going to remove the is_lost_ checks.
|
| + return; |
| + |
| if (frame->software_frame_data || frame->delegated_frame_data || |
| !context_provider()) { |
| frame->AssignTo(&last_sent_frame_); |