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

Unified Diff: gpu/command_buffer/service/texture_manager.h

Issue 1256613002: Add tracing for GL texture objects (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@browser_process_id
Patch Set: Key texture manager memory dump provider registration off of memory_tracker_ Created 5 years, 4 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 | « gpu/command_buffer/service/mocks.h ('k') | gpu/command_buffer/service/texture_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/texture_manager.h
diff --git a/gpu/command_buffer/service/texture_manager.h b/gpu/command_buffer/service/texture_manager.h
index a323076a97d821ab89b112bdbd01f584c2788bbd..62444c0d11587d5b56716764a5a76f45660b037b 100644
--- a/gpu/command_buffer/service/texture_manager.h
+++ b/gpu/command_buffer/service/texture_manager.h
@@ -555,7 +555,7 @@ struct DecoderTextureState {
//
// NOTE: To support shared resources an instance of this class will need to be
// shared by multiple GLES2Decoders.
-class GPU_EXPORT TextureManager {
+class GPU_EXPORT TextureManager : public base::trace_event::MemoryDumpProvider {
public:
class GPU_EXPORT DestructionObserver {
public:
@@ -587,7 +587,7 @@ class GPU_EXPORT TextureManager {
GLsizei max_rectangle_texture_size,
GLsizei max_3d_texture_size,
bool use_default_textures);
- ~TextureManager();
+ ~TextureManager() override;
void set_framebuffer_manager(FramebufferManager* manager) {
framebuffer_manager_ = manager;
@@ -867,6 +867,9 @@ class GPU_EXPORT TextureManager {
ErrorState* error_state, const char* function_name,
GLenum format, GLenum type, GLenum internal_format, GLint level);
+ // base::trace_event::MemoryDumpProvider implementation.
+ bool OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd) override;
+
private:
friend class Texture;
friend class TextureRef;
@@ -896,9 +899,14 @@ class GPU_EXPORT TextureManager {
GLenum AdjustTexFormat(GLenum format) const;
+ // Helper function called by OnMemoryDump.
+ void DumpTextureRef(base::trace_event::ProcessMemoryDump* pmd,
+ TextureRef* ref);
+
MemoryTypeTracker* GetMemTracker(GLenum texture_pool);
scoped_ptr<MemoryTypeTracker> memory_tracker_managed_;
scoped_ptr<MemoryTypeTracker> memory_tracker_unmanaged_;
+ MemoryTracker* memory_tracker_;
scoped_refptr<FeatureInfo> feature_info_;
« no previous file with comments | « gpu/command_buffer/service/mocks.h ('k') | gpu/command_buffer/service/texture_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698