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

Unified Diff: third_party/WebKit/Source/core/html/HTMLCanvasElement.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: 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
Index: third_party/WebKit/Source/core/html/HTMLCanvasElement.h
diff --git a/third_party/WebKit/Source/core/html/HTMLCanvasElement.h b/third_party/WebKit/Source/core/html/HTMLCanvasElement.h
index f208f37cd8c8b58d3b37059210374440d256c221..cb3c31b21a4ede1b5a2d94ba360a12e3e434f436 100644
--- a/third_party/WebKit/Source/core/html/HTMLCanvasElement.h
+++ b/third_party/WebKit/Source/core/html/HTMLCanvasElement.h
@@ -169,6 +169,7 @@ public:
static void registerRenderingContextFactory(PassOwnPtr<CanvasRenderingContextFactory>);
void updateExternallyAllocatedMemory() const;
+ static void updateTotalMemoryForAcceleratedCanvases(intptr_t diffFromCurrAllocatedMemory);
void styleDidChange(const ComputedStyle* oldStyle, const ComputedStyle& newStyle);
@@ -209,7 +210,8 @@ private:
FloatRect m_dirtyRect;
mutable intptr_t m_externallyAllocatedMemory;
-
+ static intptr_t s_totalMemoryForAcceleratedCanvases;
danakj 2015/11/30 23:07:03 I would maybe suggest tying this to a single blink
xlai (Olivia) 2015/12/01 21:50:25 I did some experiments and confirmed that this var
danakj 2015/12/01 22:13:35 Chrome will put tabs in different processes in dif
+
bool m_originClean;
// It prevents HTMLCanvasElement::buffer() from continuously re-attempting to allocate an imageBuffer

Powered by Google App Engine
This is Rietveld 408576698