| 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" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 | 54 |
| 55 protected: | 55 protected: |
| 56 }; | 56 }; |
| 57 | 57 |
| 58 class TestSoftwareOutputDevice : public SoftwareOutputDevice { | 58 class TestSoftwareOutputDevice : public SoftwareOutputDevice { |
| 59 public: | 59 public: |
| 60 TestSoftwareOutputDevice(); | 60 TestSoftwareOutputDevice(); |
| 61 virtual ~TestSoftwareOutputDevice(); | 61 virtual ~TestSoftwareOutputDevice(); |
| 62 | 62 |
| 63 // Overriden from cc:SoftwareOutputDevice | 63 // Overriden from cc:SoftwareOutputDevice |
| 64 virtual void DiscardBackbuffer() OVERRIDE; | 64 virtual void DiscardBackbuffer() override; |
| 65 virtual void EnsureBackbuffer() OVERRIDE; | 65 virtual void EnsureBackbuffer() override; |
| 66 | 66 |
| 67 int discard_backbuffer_count() { return discard_backbuffer_count_; } | 67 int discard_backbuffer_count() { return discard_backbuffer_count_; } |
| 68 int ensure_backbuffer_count() { return ensure_backbuffer_count_; } | 68 int ensure_backbuffer_count() { return ensure_backbuffer_count_; } |
| 69 | 69 |
| 70 private: | 70 private: |
| 71 int discard_backbuffer_count_; | 71 int discard_backbuffer_count_; |
| 72 int ensure_backbuffer_count_; | 72 int ensure_backbuffer_count_; |
| 73 }; | 73 }; |
| 74 | 74 |
| 75 TestSoftwareOutputDevice::TestSoftwareOutputDevice() | 75 TestSoftwareOutputDevice::TestSoftwareOutputDevice() |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 EXPECT_EQ(1, software_output_device->ensure_backbuffer_count()); | 218 EXPECT_EQ(1, software_output_device->ensure_backbuffer_count()); |
| 219 EXPECT_EQ(0, software_output_device->discard_backbuffer_count()); | 219 EXPECT_EQ(0, software_output_device->discard_backbuffer_count()); |
| 220 output_surface.DiscardBackbuffer(); | 220 output_surface.DiscardBackbuffer(); |
| 221 | 221 |
| 222 EXPECT_EQ(1, software_output_device->ensure_backbuffer_count()); | 222 EXPECT_EQ(1, software_output_device->ensure_backbuffer_count()); |
| 223 EXPECT_EQ(1, software_output_device->discard_backbuffer_count()); | 223 EXPECT_EQ(1, software_output_device->discard_backbuffer_count()); |
| 224 } | 224 } |
| 225 | 225 |
| 226 } // namespace | 226 } // namespace |
| 227 } // namespace cc | 227 } // namespace cc |
| OLD | NEW |