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

Unified Diff: Source/core/html/HTMLCanvasElement.h

Issue 117703004: Free temporary GPU and memory resources held by inactive or hidden 2D canvases (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fixed upstream git branch Created 7 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: Source/core/html/HTMLCanvasElement.h
diff --git a/Source/core/html/HTMLCanvasElement.h b/Source/core/html/HTMLCanvasElement.h
index fa7ad1e8e8e6f016872a5483695b3220ad395423..e40c94e62956ee538e349971fefb7a065a50788a 100644
--- a/Source/core/html/HTMLCanvasElement.h
+++ b/Source/core/html/HTMLCanvasElement.h
@@ -31,6 +31,7 @@
#include "core/html/HTMLElement.h"
#include "platform/geometry/FloatRect.h"
#include "platform/geometry/IntSize.h"
+#include "platform/graphics/Canvas2DLayerBridge.h"
#include "wtf/Forward.h"
#define DefaultInterpolationQuality InterpolationMedium
@@ -57,7 +58,7 @@ public:
virtual void canvasDestroyed(HTMLCanvasElement*) = 0;
};
-class HTMLCanvasElement FINAL : public HTMLElement {
+class HTMLCanvasElement FINAL : public HTMLElement, public Canvas2DLayerBridgeClient {
public:
static PassRefPtr<HTMLCanvasElement> create(Document&);
virtual ~HTMLCanvasElement();
@@ -125,6 +126,9 @@ public:
InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
+ // Canvas2DLayerBridgeClient implementation
+ virtual bool hidden() const OVERRIDE { return document().hidden(); }
eseidel 2013/12/19 02:56:32 Why do these individual elements know if they're h
+
private:
explicit HTMLCanvasElement(Document&);
« no previous file with comments | « no previous file | Source/core/html/HTMLCanvasElement.cpp » ('j') | Source/platform/graphics/Canvas2DLayerBridge.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698