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

Unified Diff: ui/gl/gl_image_ref_counted_memory.cc

Issue 1418483003: Revert of ui: Move GLImage::BindTexImage fallback from GLImage implementations to GLES2CmdDecoder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « ui/gl/gl_image_ref_counted_memory.h ('k') | ui/gl/gl_image_ref_counted_memory_unittest.cc » ('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 6533568785a88ef11841dcd05a9c7945203b9424..7aadd247e947134c1e10f334dfcac3118c508d64 100644
--- a/ui/gl/gl_image_ref_counted_memory.cc
+++ b/ui/gl/gl_image_ref_counted_memory.cc
@@ -6,15 +6,13 @@
#include "base/logging.h"
#include "base/memory/ref_counted_memory.h"
-#include "base/trace_event/memory_allocator_dump.h"
-#include "base/trace_event/memory_dump_manager.h"
-#include "base/trace_event/process_memory_dump.h"
namespace gfx {
-GLImageRefCountedMemory::GLImageRefCountedMemory(const Size& size,
+GLImageRefCountedMemory::GLImageRefCountedMemory(const gfx::Size& size,
unsigned internalformat)
- : GLImageMemory(size, internalformat) {}
+ : GLImageMemory(size, internalformat) {
+}
GLImageRefCountedMemory::~GLImageRefCountedMemory() {
DCHECK(!ref_counted_memory_.get());
@@ -22,7 +20,7 @@
bool GLImageRefCountedMemory::Initialize(
base::RefCountedMemory* ref_counted_memory,
- BufferFormat format) {
+ gfx::BufferFormat format) {
if (!GLImageMemory::Initialize(ref_counted_memory->front(), format))
return false;
@@ -33,7 +31,7 @@
void GLImageRefCountedMemory::Destroy(bool have_context) {
GLImageMemory::Destroy(have_context);
- ref_counted_memory_ = nullptr;
+ ref_counted_memory_ = NULL;
}
void GLImageRefCountedMemory::OnMemoryDump(
@@ -54,6 +52,9 @@
pmd->AddSuballocation(dump->guid(),
base::trace_event::MemoryDumpManager::GetInstance()
->system_allocator_pool_name());
+
+ // Also dump the base class's texture memory.
+ GLImageMemory::OnMemoryDump(pmd, process_tracing_id, dump_name);
}
} // namespace gfx
« no previous file with comments | « ui/gl/gl_image_ref_counted_memory.h ('k') | ui/gl/gl_image_ref_counted_memory_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698