Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(381)

Side by Side Diff: cc/test/test_gpu_memory_buffer_manager.cc

Issue 1280513002: Add GenericSharedMemoryId and use w/ GpuMemoryBuffer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@trackpools
Patch Set: remove "tracing" from name Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | components/view_manager/gles2/command_buffer_driver.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 gfx::BufferFormat GetFormat() const override { return format_; } 116 gfx::BufferFormat GetFormat() const override { return format_; }
117 void GetStride(int* stride) const override { 117 void GetStride(int* stride) const override {
118 int num_planes = 118 int num_planes =
119 static_cast<int>(gfx::NumberOfPlanesForBufferFormat(format_)); 119 static_cast<int>(gfx::NumberOfPlanesForBufferFormat(format_));
120 for (int i = 0; i < num_planes; ++i) 120 for (int i = 0; i < num_planes; ++i)
121 stride[i] = 121 stride[i] =
122 base::checked_cast<int>(StrideInBytes(size_.width(), format_, i)); 122 base::checked_cast<int>(StrideInBytes(size_.width(), format_, i));
123 } 123 }
124 gfx::GpuMemoryBufferId GetId() const override { 124 gfx::GpuMemoryBufferId GetId() const override {
125 NOTREACHED(); 125 NOTREACHED();
126 return 0; 126 return gfx::GpuMemoryBufferId(0);
127 } 127 }
128 gfx::GpuMemoryBufferHandle GetHandle() const override { 128 gfx::GpuMemoryBufferHandle GetHandle() const override {
129 gfx::GpuMemoryBufferHandle handle; 129 gfx::GpuMemoryBufferHandle handle;
130 handle.type = gfx::SHARED_MEMORY_BUFFER; 130 handle.type = gfx::SHARED_MEMORY_BUFFER;
131 handle.handle = shared_memory_->handle(); 131 handle.handle = shared_memory_->handle();
132 return handle; 132 return handle;
133 } 133 }
134 ClientBuffer AsClientBuffer() override { 134 ClientBuffer AsClientBuffer() override {
135 return reinterpret_cast<ClientBuffer>(this); 135 return reinterpret_cast<ClientBuffer>(this);
136 } 136 }
(...skipping 29 matching lines...) Expand all
166 ClientBuffer buffer) { 166 ClientBuffer buffer) {
167 return reinterpret_cast<gfx::GpuMemoryBuffer*>(buffer); 167 return reinterpret_cast<gfx::GpuMemoryBuffer*>(buffer);
168 } 168 }
169 169
170 void TestGpuMemoryBufferManager::SetDestructionSyncPoint( 170 void TestGpuMemoryBufferManager::SetDestructionSyncPoint(
171 gfx::GpuMemoryBuffer* buffer, 171 gfx::GpuMemoryBuffer* buffer,
172 uint32 sync_point) { 172 uint32 sync_point) {
173 } 173 }
174 174
175 } // namespace cc 175 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | components/view_manager/gles2/command_buffer_driver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698