OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "cc/output/output_surface.h" | 5 #include "cc/output/output_surface.h" |
6 | 6 |
7 #include "base/test/test_simple_task_runner.h" | 7 #include "base/test/test_simple_task_runner.h" |
8 #include "cc/output/managed_memory_policy.h" | 8 #include "cc/output/managed_memory_policy.h" |
9 #include "cc/output/output_surface_client.h" | 9 #include "cc/output/output_surface_client.h" |
10 #include "cc/output/software_output_device.h" | 10 #include "cc/output/software_output_device.h" |
11 #include "cc/test/begin_frame_args_test.h" | 11 #include "cc/test/begin_frame_args_test.h" |
12 #include "cc/test/fake_output_surface.h" | 12 #include "cc/test/fake_output_surface.h" |
13 #include "cc/test/fake_output_surface_client.h" | 13 #include "cc/test/fake_output_surface_client.h" |
14 #include "cc/test/test_context_provider.h" | 14 #include "cc/test/test_context_provider.h" |
15 #include "cc/test/test_web_graphics_context_3d.h" | 15 #include "cc/test/test_web_graphics_context_3d.h" |
16 #include "gpu/GLES2/gl2extchromium.h" | 16 #include "gpu/GLES2/gl2extchromium.h" |
17 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
18 #include "ui/gfx/frame_time.h" | |
19 | 18 |
20 namespace cc { | 19 namespace cc { |
21 namespace { | 20 namespace { |
22 | 21 |
23 class TestOutputSurface : public OutputSurface { | 22 class TestOutputSurface : public OutputSurface { |
24 public: | 23 public: |
25 explicit TestOutputSurface(scoped_refptr<ContextProvider> context_provider) | 24 explicit TestOutputSurface(scoped_refptr<ContextProvider> context_provider) |
26 : OutputSurface(context_provider) {} | 25 : OutputSurface(context_provider) {} |
27 | 26 |
28 TestOutputSurface(scoped_refptr<ContextProvider> context_provider, | 27 TestOutputSurface(scoped_refptr<ContextProvider> context_provider, |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 EXPECT_EQ(1, software_output_device->ensure_backbuffer_count()); | 198 EXPECT_EQ(1, software_output_device->ensure_backbuffer_count()); |
200 EXPECT_EQ(0, software_output_device->discard_backbuffer_count()); | 199 EXPECT_EQ(0, software_output_device->discard_backbuffer_count()); |
201 output_surface.DiscardBackbuffer(); | 200 output_surface.DiscardBackbuffer(); |
202 | 201 |
203 EXPECT_EQ(1, software_output_device->ensure_backbuffer_count()); | 202 EXPECT_EQ(1, software_output_device->ensure_backbuffer_count()); |
204 EXPECT_EQ(1, software_output_device->discard_backbuffer_count()); | 203 EXPECT_EQ(1, software_output_device->discard_backbuffer_count()); |
205 } | 204 } |
206 | 205 |
207 } // namespace | 206 } // namespace |
208 } // namespace cc | 207 } // namespace cc |
OLD | NEW |