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

Unified Diff: cc/playback/display_list_raster_source.h

Issue 1725553002: Dump DisplayListRasterSource memory (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add missing include for windows build Created 4 years, 10 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 | « no previous file | cc/playback/display_list_raster_source.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/playback/display_list_raster_source.h
diff --git a/cc/playback/display_list_raster_source.h b/cc/playback/display_list_raster_source.h
index 9ebfd4fb657d67b27f54b37cde5f26453b16a3fa..9b25b3a33e81f2ae36a76f393ad48e36cdb9d166 100644
--- a/cc/playback/display_list_raster_source.h
+++ b/cc/playback/display_list_raster_source.h
@@ -11,6 +11,9 @@
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
+#include "base/threading/thread_checker.h"
+#include "base/trace_event/memory_allocator_dump.h"
+#include "base/trace_event/memory_dump_provider.h"
#include "cc/base/cc_export.h"
#include "cc/debug/rendering_stats_instrumentation.h"
#include "cc/playback/display_list_recording_source.h"
@@ -24,7 +27,8 @@ class DrawImage;
class ImageDecodeController;
class CC_EXPORT DisplayListRasterSource
- : public base::RefCountedThreadSafe<DisplayListRasterSource> {
+ : public base::trace_event::MemoryDumpProvider,
+ public base::RefCountedThreadSafe<DisplayListRasterSource> {
public:
static scoped_refptr<DisplayListRasterSource>
CreateFromDisplayListRecordingSource(const DisplayListRecordingSource* other,
@@ -111,6 +115,10 @@ class CC_EXPORT DisplayListRasterSource
// of the raster source, since the raster source will access it during raster.
void SetImageDecodeController(ImageDecodeController* image_decode_controller);
+ // base::trace_event::MemoryDumpProvider implementation
+ bool OnMemoryDump(const base::trace_event::MemoryDumpArgs& args,
+ base::trace_event::ProcessMemoryDump* pmd) override;
+
protected:
friend class base::RefCountedThreadSafe<DisplayListRasterSource>;
@@ -118,7 +126,7 @@ class CC_EXPORT DisplayListRasterSource
bool can_use_lcd_text);
DisplayListRasterSource(const DisplayListRasterSource* other,
bool can_use_lcd_text);
- virtual ~DisplayListRasterSource();
+ ~DisplayListRasterSource() override;
// These members are const as this raster source may be in use on another
// thread and so should not be touched after construction.
@@ -159,6 +167,9 @@ class CC_EXPORT DisplayListRasterSource
const gfx::Rect& canvas_playback_rect,
float contents_scale) const;
+ // Used to ensure that memory dump logic always happens on the same thread.
+ base::ThreadChecker memory_dump_thread_checker_;
+
DISALLOW_COPY_AND_ASSIGN(DisplayListRasterSource);
};
« no previous file with comments | « no previous file | cc/playback/display_list_raster_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698