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

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

Issue 1403283007: Re-land: ui: Add custom stride support to GLImageMemory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more missing static_casts Created 5 years, 1 month 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
« no previous file with comments | « cc/test/test_image_factory.cc ('k') | components/mus/gles2/command_buffer_local.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ba13464fbef06eb94392dd94032268e35e13f7d3..2a7265a5ae33130a037e99476bdd4dff38df7214 100644
--- a/components/mus/gles2/command_buffer_driver.cc
+++ b/components/mus/gles2/command_buffer_driver.cc
@@ -26,6 +26,7 @@
#include "gpu/command_buffer/service/valuebuffer_manager.h"
#include "mojo/converters/geometry/geometry_type_converters.h"
#include "mojo/platform_handle/platform_handle_functions.h"
+#include "ui/gfx/buffer_format_util.h"
#include "ui/gfx/gpu_memory_buffer.h"
#include "ui/gfx/vsync_provider.h"
#include "ui/gl/gl_context.h"
@@ -250,7 +251,9 @@ void CommandBufferDriver::CreateImage(int32_t id,
scoped_refptr<gl::GLImageSharedMemory> image =
new gl::GLImageSharedMemory(gfx_size, internal_format);
// TODO(jam): also need a mojo enum for this enum
- if (!image->Initialize(handle, gfx::GpuMemoryBufferId(id), gpu_format, 0)) {
+ if (!image->Initialize(
+ handle, gfx::GpuMemoryBufferId(id), gpu_format, 0,
+ gfx::RowSizeForBufferFormat(gfx_size.width(), gpu_format, 0))) {
NOTREACHED();
return;
}
« no previous file with comments | « cc/test/test_image_factory.cc ('k') | components/mus/gles2/command_buffer_local.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698