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

Unified Diff: components/mus/gles2/command_buffer_local.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: add static_cast 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
Index: components/mus/gles2/command_buffer_local.cc
diff --git a/components/mus/gles2/command_buffer_local.cc b/components/mus/gles2/command_buffer_local.cc
index 2e0535bba42121677e156848bd326c469b9dde1a..461262bc659367153657893fd22e8df0cea60a0a 100644
--- a/components/mus/gles2/command_buffer_local.cc
+++ b/components/mus/gles2/command_buffer_local.cc
@@ -18,6 +18,7 @@
#include "gpu/command_buffer/service/shader_translator_cache.h"
#include "gpu/command_buffer/service/transfer_buffer_manager.h"
#include "gpu/command_buffer/service/valuebuffer_manager.h"
+#include "ui/gfx/buffer_format_util.h"
#include "ui/gfx/vsync_provider.h"
#include "ui/gl/gl_context.h"
#include "ui/gl/gl_image_shared_memory.h"
@@ -139,7 +140,9 @@ int32_t CommandBufferLocal::CreateImage(ClientBuffer buffer,
gfx::Size(static_cast<int>(width), static_cast<int>(height)),
internalformat));
if (!image->Initialize(base::SharedMemory::DuplicateHandle(handle.handle),
- handle.id, gpu_memory_buffer->GetFormat(), 0)) {
+ handle.id, gpu_memory_buffer->GetFormat(), 0,
+ gfx::RowSizeForBufferFormat(
+ width, gpu_memory_buffer->GetFormat(), 0))) {
return -1;
}

Powered by Google App Engine
This is Rietveld 408576698