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 "cc/test/test_gpu_memory_buffer_manager.h" | 5 #include "cc/test/test_gpu_memory_buffer_manager.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/numerics/safe_conversions.h" | 8 #include "base/numerics/safe_conversions.h" |
9 #include "ui/gfx/buffer_format_util.h" | 9 #include "ui/gfx/buffer_format_util.h" |
10 #include "ui/gfx/gpu_memory_buffer.h" | 10 #include "ui/gfx/gpu_memory_buffer.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 size_.width(), format_, static_cast<int>(plane))); | 49 size_.width(), format_, static_cast<int>(plane))); |
50 } | 50 } |
51 gfx::GpuMemoryBufferId GetId() const override { | 51 gfx::GpuMemoryBufferId GetId() const override { |
52 NOTREACHED(); | 52 NOTREACHED(); |
53 return gfx::GpuMemoryBufferId(0); | 53 return gfx::GpuMemoryBufferId(0); |
54 } | 54 } |
55 gfx::GpuMemoryBufferHandle GetHandle() const override { | 55 gfx::GpuMemoryBufferHandle GetHandle() const override { |
56 gfx::GpuMemoryBufferHandle handle; | 56 gfx::GpuMemoryBufferHandle handle; |
57 handle.type = gfx::SHARED_MEMORY_BUFFER; | 57 handle.type = gfx::SHARED_MEMORY_BUFFER; |
58 handle.handle = shared_memory_->handle(); | 58 handle.handle = shared_memory_->handle(); |
| 59 handle.offset = 0; |
59 return handle; | 60 return handle; |
60 } | 61 } |
61 ClientBuffer AsClientBuffer() override { | 62 ClientBuffer AsClientBuffer() override { |
62 return reinterpret_cast<ClientBuffer>(this); | 63 return reinterpret_cast<ClientBuffer>(this); |
63 } | 64 } |
64 | 65 |
65 private: | 66 private: |
66 const gfx::Size size_; | 67 const gfx::Size size_; |
67 gfx::BufferFormat format_; | 68 gfx::BufferFormat format_; |
68 scoped_ptr<base::SharedMemory> shared_memory_; | 69 scoped_ptr<base::SharedMemory> shared_memory_; |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 ClientBuffer buffer) { | 104 ClientBuffer buffer) { |
104 return reinterpret_cast<gfx::GpuMemoryBuffer*>(buffer); | 105 return reinterpret_cast<gfx::GpuMemoryBuffer*>(buffer); |
105 } | 106 } |
106 | 107 |
107 void TestGpuMemoryBufferManager::SetDestructionSyncPoint( | 108 void TestGpuMemoryBufferManager::SetDestructionSyncPoint( |
108 gfx::GpuMemoryBuffer* buffer, | 109 gfx::GpuMemoryBuffer* buffer, |
109 uint32 sync_point) { | 110 uint32 sync_point) { |
110 } | 111 } |
111 | 112 |
112 } // namespace cc | 113 } // namespace cc |
OLD | NEW |