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

Unified Diff: components/mus/gles2/command_buffer_driver.cc

Issue 2008193002: Change mojo geometry structs from using type converters to StructTraits. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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: components/mus/gles2/command_buffer_driver.cc
diff --git a/components/mus/gles2/command_buffer_driver.cc b/components/mus/gles2/command_buffer_driver.cc
index a8d178293f147587cca006bec84f08b741f2f327..3c554381719b6c1bd463147cd16e5b7de696e115 100644
--- a/components/mus/gles2/command_buffer_driver.cc
+++ b/components/mus/gles2/command_buffer_driver.cc
@@ -25,7 +25,6 @@
#include "gpu/command_buffer/service/query_manager.h"
#include "gpu/command_buffer/service/sync_point_manager.h"
#include "gpu/command_buffer/service/transfer_buffer_manager.h"
-#include "mojo/converters/geometry/geometry_type_converters.h"
#include "mojo/public/cpp/system/platform_handle.h"
#include "ui/gfx/buffer_format_util.h"
#include "ui/gfx/gpu_memory_buffer.h"
@@ -218,7 +217,7 @@ void CommandBufferDriver::DestroyTransferBuffer(int32_t id) {
void CommandBufferDriver::CreateImage(int32_t id,
mojo::ScopedHandle memory_handle,
int32_t type,
- mojo::SizePtr size,
+ const gfx::Size& size,
int32_t format,
int32_t internal_format) {
DCHECK(CalledOnValidThread());
@@ -238,8 +237,7 @@ void CommandBufferDriver::CreateImage(int32_t id,
return;
}
- gfx::Size gfx_size = size.To<gfx::Size>();
- if (!gpu::IsImageSizeValidForGpuMemoryBufferFormat(gfx_size, gpu_format)) {
+ if (!gpu::IsImageSizeValidForGpuMemoryBufferFormat(size, gpu_format)) {
LOG(ERROR) << "Invalid image size for format.";
return;
}
@@ -270,11 +268,11 @@ void CommandBufferDriver::CreateImage(int32_t id,
#endif
scoped_refptr<gl::GLImageSharedMemory> image =
- new gl::GLImageSharedMemory(gfx_size, internal_format);
+ new gl::GLImageSharedMemory(size, internal_format);
// TODO(jam): also need a mojo enum for this enum
if (!image->Initialize(
handle, gfx::GpuMemoryBufferId(id), gpu_format, 0,
- gfx::RowSizeForBufferFormat(gfx_size.width(), gpu_format, 0))) {
+ gfx::RowSizeForBufferFormat(size.width(), gpu_format, 0))) {
NOTREACHED();
return;
}

Powered by Google App Engine
This is Rietveld 408576698