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

Unified Diff: ui/gl/gl_image_ref_counted_memory.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 | « ui/gl/gl_image_memory.cc ('k') | ui/gl/gl_image_shared_memory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_image_ref_counted_memory.cc
diff --git a/ui/gl/gl_image_ref_counted_memory.cc b/ui/gl/gl_image_ref_counted_memory.cc
index a417f1573c722dba4d8ce8d482086e94e84debbc..1831c084a215b092cc6fc16eae1a84cad0f601c1 100644
--- a/ui/gl/gl_image_ref_counted_memory.cc
+++ b/ui/gl/gl_image_ref_counted_memory.cc
@@ -9,6 +9,7 @@
#include "base/trace_event/memory_allocator_dump.h"
#include "base/trace_event/memory_dump_manager.h"
#include "base/trace_event/process_memory_dump.h"
+#include "ui/gfx/buffer_format_util.h"
namespace gl {
@@ -23,8 +24,11 @@ GLImageRefCountedMemory::~GLImageRefCountedMemory() {
bool GLImageRefCountedMemory::Initialize(
base::RefCountedMemory* ref_counted_memory,
gfx::BufferFormat format) {
- if (!GLImageMemory::Initialize(ref_counted_memory->front(), format))
+ if (!GLImageMemory::Initialize(
+ ref_counted_memory->front(), format,
+ gfx::RowSizeForBufferFormat(GetSize().width(), format, 0))) {
return false;
+ }
DCHECK(!ref_counted_memory_.get());
ref_counted_memory_ = ref_counted_memory;
« no previous file with comments | « ui/gl/gl_image_memory.cc ('k') | ui/gl/gl_image_shared_memory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698