OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <set> | 5 #include <set> |
6 | 6 |
7 #include "cc/test/test_context_provider.h" | 7 #include "cc/test/test_context_provider.h" |
8 #include "cc/test/test_web_graphics_context_3d.h" | 8 #include "cc/test/test_web_graphics_context_3d.h" |
9 #include "content/browser/compositor/buffer_queue.h" | 9 #include "content/browser/compositor/buffer_queue.h" |
10 #include "content/browser/compositor/gpu_surfaceless_browser_compositor_output_s
urface.h" | 10 #include "content/browser/compositor/gpu_surfaceless_browser_compositor_output_s
urface.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 StubGpuMemoryBufferImpl() {} | 27 StubGpuMemoryBufferImpl() {} |
28 | 28 |
29 // Overridden from gfx::GpuMemoryBuffer: | 29 // Overridden from gfx::GpuMemoryBuffer: |
30 bool Map(void** data) override { return false; } | 30 bool Map(void** data) override { return false; } |
31 void Unmap() override {} | 31 void Unmap() override {} |
32 bool IsMapped() const override { return false; } | 32 bool IsMapped() const override { return false; } |
33 gfx::BufferFormat GetFormat() const override { | 33 gfx::BufferFormat GetFormat() const override { |
34 return gfx::BufferFormat::RGBX_8888; | 34 return gfx::BufferFormat::RGBX_8888; |
35 } | 35 } |
36 void GetStride(int* stride) const override {} | 36 void GetStride(int* stride) const override {} |
37 gfx::GpuMemoryBufferId GetId() const override { return 0; } | 37 gfx::GpuMemoryBufferId GetId() const override { |
| 38 return gfx::GpuMemoryBufferId(0); |
| 39 } |
38 gfx::GpuMemoryBufferHandle GetHandle() const override { | 40 gfx::GpuMemoryBufferHandle GetHandle() const override { |
39 return gfx::GpuMemoryBufferHandle(); | 41 return gfx::GpuMemoryBufferHandle(); |
40 } | 42 } |
41 ClientBuffer AsClientBuffer() override { | 43 ClientBuffer AsClientBuffer() override { |
42 return reinterpret_cast<ClientBuffer>(this); | 44 return reinterpret_cast<ClientBuffer>(this); |
43 } | 45 } |
44 }; | 46 }; |
45 | 47 |
46 class StubBrowserGpuMemoryBufferManager : public BrowserGpuMemoryBufferManager { | 48 class StubBrowserGpuMemoryBufferManager : public BrowserGpuMemoryBufferManager { |
47 public: | 49 public: |
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
548 // All free buffers should be destroyed, the remaining buffers should all | 550 // All free buffers should be destroyed, the remaining buffers should all |
549 // be replaced but still valid. | 551 // be replaced but still valid. |
550 EXPECT_EQ(1U, in_flight_surfaces().size()); | 552 EXPECT_EQ(1U, in_flight_surfaces().size()); |
551 EXPECT_EQ(0U, available_surfaces().size()); | 553 EXPECT_EQ(0U, available_surfaces().size()); |
552 EXPECT_TRUE(displayed_frame().texture); | 554 EXPECT_TRUE(displayed_frame().texture); |
553 EXPECT_TRUE(current_frame().texture); | 555 EXPECT_TRUE(current_frame().texture); |
554 } | 556 } |
555 | 557 |
556 } // namespace | 558 } // namespace |
557 } // namespace content | 559 } // namespace content |
OLD | NEW |