Index: Source/core/rendering/compositing/GraphicsLayerUpdater.h |
diff --git a/Source/core/frame/SuspendableTimer.h b/Source/core/rendering/compositing/GraphicsLayerUpdater.h |
similarity index 57% |
copy from Source/core/frame/SuspendableTimer.h |
copy to Source/core/rendering/compositing/GraphicsLayerUpdater.h |
index c07f0d73e2726c760c09b64bb286273460f9ca3c..0ab1ee73534af54f2ab88316ed9f12d631375bbe 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. |
* |
esprehn
2014/03/01 09:37:07
This is a brand new file, lets use the new copyrig
abarth-chromium
2014/03/01 09:40:39
It contains code from an old file. No fair launde
|
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
@@ -21,39 +22,42 @@ |
* 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(); |
+ |
+ void updateRecursive(RenderLayer*); |
+ void rebuildTree(RenderLayer*, Vector<GraphicsLayer*>& childLayersOfEnclosingLayer, int depth); |
- // ActiveDOMObject |
- virtual bool hasPendingActivity() const OVERRIDE FINAL; |
- virtual void stop() OVERRIDE; |
- virtual void suspend() OVERRIDE FINAL; |
- virtual void resume() OVERRIDE FINAL; |
+ // Return true if the layers changed. |
+ static bool parentFrameContentLayers(RenderPart*); |
esprehn
2014/03/01 09:37:07
Should it also take a RenderPart& ? Also parentFra
abarth-chromium
2014/03/01 09:40:39
This function makes zero sense. I can leave it in
|
private: |
- virtual void fired() = 0; |
- |
- double m_nextFireInterval; |
- double m_repeatInterval; |
- bool m_active; |
-#if !ASSERT_DISABLED |
- bool m_suspended; |
-#endif |
+ void update(RenderLayer*); |
esprehn
2014/03/01 09:37:07
RenderLayer& ?
abarth-chromium
2014/03/01 09:40:39
Sure.
|
+ |
+ 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 |