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

Unified Diff: Source/core/rendering/compositing/GraphicsLayerUpdater.h

Issue 185293002: Factor GraphicsLayerUpdater out of RenderLayerCompositor (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address reviewer comments Created 6 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
Index: Source/core/rendering/compositing/GraphicsLayerUpdater.h
diff --git a/Source/core/frame/SuspendableTimer.h b/Source/core/rendering/compositing/GraphicsLayerUpdater.h
similarity index 60%
copy from Source/core/frame/SuspendableTimer.h
copy to Source/core/rendering/compositing/GraphicsLayerUpdater.h
index c07f0d73e2726c760c09b64bb286273460f9ca3c..9b9658a2762919cade645aef2298c6e18d87f639 100644
--- a/Source/core/frame/SuspendableTimer.h
+++ b/Source/core/rendering/compositing/GraphicsLayerUpdater.h
@@ -1,5 +1,6 @@
/*
- * Copyright (C) 2008 Apple Inc. All Rights Reserved.
+ * Copyright (C) 2009, 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -21,39 +22,39 @@
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
*/
-#ifndef SuspendableTimer_h
-#define SuspendableTimer_h
+#ifndef GraphicsLayerUpdater_h
+#define GraphicsLayerUpdater_h
-#include "core/dom/ActiveDOMObject.h"
-#include "platform/Timer.h"
+#include "wtf/Vector.h"
namespace WebCore {
-class SuspendableTimer : public TimerBase, public ActiveDOMObject {
+class GraphicsLayer;
+class RenderLayer;
+class RenderPart;
+class RenderView;
+
+class GraphicsLayerUpdater {
public:
- explicit SuspendableTimer(ExecutionContext*);
- virtual ~SuspendableTimer();
+ explicit GraphicsLayerUpdater(RenderView&);
+ ~GraphicsLayerUpdater();
- // ActiveDOMObject
- virtual bool hasPendingActivity() const OVERRIDE FINAL;
- virtual void stop() OVERRIDE;
- virtual void suspend() OVERRIDE FINAL;
- virtual void resume() OVERRIDE FINAL;
+ void updateRecursive(RenderLayer&);
+ void rebuildTree(RenderLayer&, Vector<GraphicsLayer*>& childLayersOfEnclosingLayer, int depth);
private:
- virtual void fired() = 0;
-
- double m_nextFireInterval;
- double m_repeatInterval;
- bool m_active;
-#if !ASSERT_DISABLED
- bool m_suspended;
-#endif
+ void update(RenderLayer&);
+
+ RenderView& m_renderView;
+
+ // Used for gathering UMA data about the effect on memory usage of promoting all layers
+ // that have a webkit-transition on opacity or transform and intersect the viewport.
+ double m_pixelsWithoutPromotingAllTransitions;
+ double m_pixelsAddedByPromotingAllTransitions;
};
} // namespace WebCore
-#endif // SuspendableTimer_h
+#endif // GraphicsLayerUpdater_h

Powered by Google App Engine
This is Rietveld 408576698