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

Unified Diff: content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.cc

Issue 1281043006: Move NumberOfPlanesForGpuMemoryBufferFormat to gfx (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix build warning again 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 side-by-side diff with in-line comments
Download patch
Index: content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.cc
diff --git a/content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.cc b/content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.cc
index 9db36962d20ed24423a55646490399a8aef00764..1f52a646fdeaeb7c09ab3be17717de198d02218b 100644
--- a/content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.cc
+++ b/content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.cc
@@ -149,7 +149,7 @@ bool GpuMemoryBufferImplSharedMemory::IsSizeValidForFormat(
case gfx::BufferFormat::RGBX_8888:
return true;
case gfx::BufferFormat::YUV_420: {
- size_t num_planes = NumberOfPlanesForGpuMemoryBufferFormat(format);
+ size_t num_planes = gfx::GpuMemoryBuffer::NumberOfPlanes(format);
for (size_t i = 0; i < num_planes; ++i) {
size_t factor = SubsamplingFactor(format, i);
if (size.width() % factor || size.height() % factor)
@@ -166,7 +166,7 @@ bool GpuMemoryBufferImplSharedMemory::IsSizeValidForFormat(
bool GpuMemoryBufferImplSharedMemory::Map(void** data) {
DCHECK(!mapped_);
size_t offset = 0;
- size_t num_planes = NumberOfPlanesForGpuMemoryBufferFormat(format_);
+ size_t num_planes = gfx::GpuMemoryBuffer::NumberOfPlanes(format_);
for (size_t i = 0; i < num_planes; ++i) {
data[i] = reinterpret_cast<uint8*>(shared_memory_->memory()) + offset;
size_t row_size_in_bytes = 0;
@@ -186,7 +186,7 @@ void GpuMemoryBufferImplSharedMemory::Unmap() {
}
void GpuMemoryBufferImplSharedMemory::GetStride(int* stride) const {
- size_t num_planes = NumberOfPlanesForGpuMemoryBufferFormat(format_);
+ size_t num_planes = gfx::GpuMemoryBuffer::NumberOfPlanes(format_);
for (size_t i = 0; i < num_planes; ++i) {
size_t row_size_in_bytes = 0;
bool valid_row_size =

Powered by Google App Engine
This is Rietveld 408576698