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

Unified Diff: third_party/WebKit/Source/platform/graphics/ImageBuffer.h

Issue 1482363004: Fixing laggy chrome on a multitude of accelerated canvases (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moving variables to ImageBuffer and Adding Unit Test Created 5 years 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: third_party/WebKit/Source/platform/graphics/ImageBuffer.h
diff --git a/third_party/WebKit/Source/platform/graphics/ImageBuffer.h b/third_party/WebKit/Source/platform/graphics/ImageBuffer.h
index 1fd37ba6f4f2b64307a8a04923c9f9ad3dfce337..59f248a7d834305da58e5a2559bbeaa237c5777f 100644
--- a/third_party/WebKit/Source/platform/graphics/ImageBuffer.h
+++ b/third_party/WebKit/Source/platform/graphics/ImageBuffer.h
@@ -135,6 +135,10 @@ public:
void draw(GraphicsContext*, const FloatRect&, const FloatRect*, SkXfermode::Mode);
+ void updateGPUMemoryUsage() const;
+ static intptr_t getTotalGPUMemoryUsage() { return s_totalGPUMemoryUsage; }
Justin Novosad 2015/12/08 22:15:27 Total -> Global
+ intptr_t getGPUMemoryUsage() { return m_gpuMemoryUsage; }
+
private:
ImageBuffer(PassOwnPtr<ImageBufferSurface>);
@@ -146,6 +150,9 @@ private:
mutable SnapshotState m_snapshotState;
OwnPtr<ImageBufferSurface> m_surface;
ImageBufferClient* m_client;
+
+ mutable intptr_t m_gpuMemoryUsage;
+ static intptr_t s_totalGPUMemoryUsage;
};
struct ImageDataBuffer {

Powered by Google App Engine
This is Rietveld 408576698