Fixes <http://webkit.org/b/43248> WKCACFLayer shouldn't know about
WKCACFContextFlusher
Reviewed by Sam Weinig.
* platform/graphics/win/WKCACFLayer.cpp:
(WebCore::WKCACFLayer::setNeedsCommit): Don't bother calling to
WKCACFContextFlusher. Our root layer will do this for us.
* platform/graphics/win/WKCACFLayerRenderer.cpp:
(WebCore::WKCACFRootLayer::setNeedsRender): Changed to call the new
layerTreeDidChange function.
(WebCore::WKCACFLayerRenderer::layerTreeDidChange): Added. Tells
WKCACFContextFlusher that the context has changed, and schedules a
render.
* platform/graphics/win/WKCACFLayerRenderer.h: Added
layerTreeDidChange.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@64360
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2010-07-30 Adam Roben <aroben@apple.com>
+
+ Remove knowledge of WKCACFContextFlusher from WKCACFLayer
+
+ Fixes <http://webkit.org/b/43248> WKCACFLayer shouldn't know about
+ WKCACFContextFlusher
+
+ Reviewed by Sam Weinig.
+
+ * platform/graphics/win/WKCACFLayer.cpp:
+ (WebCore::WKCACFLayer::setNeedsCommit): Don't bother calling to
+ WKCACFContextFlusher. Our root layer will do this for us.
+
+ * platform/graphics/win/WKCACFLayerRenderer.cpp:
+ (WebCore::WKCACFRootLayer::setNeedsRender): Changed to call the new
+ layerTreeDidChange function.
+ (WebCore::WKCACFLayerRenderer::layerTreeDidChange): Added. Tells
+ WKCACFContextFlusher that the context has changed, and schedules a
+ render.
+
+ * platform/graphics/win/WKCACFLayerRenderer.h: Added
+ layerTreeDidChange.
+
2010-07-29 Jeremy Orlow <jorlow@chromium.org>
Reviewed by Steve Block.
#include "WKCACFLayer.h"
-#include "WKCACFContextFlusher.h"
#include "WKCACFLayerRenderer.h"
#include <wtf/text/CString.h>
{
WKCACFLayer* root = rootLayer();
- CACFContextRef context = CACFLayerGetContext(root->layer());
-
- // The context might now be set yet. This happens if a property gets set
- // before placing the layer in the tree. In this case we don't need to
- // worry about remembering the context because we will when the layer is
- // added to the tree.
- if (context)
- WKCACFContextFlusher::shared().addContext(context);
-
// Call setNeedsRender on the root layer, which will cause a render to
// happen in WKCACFLayerRenderer
root->setNeedsRender();
return adoptRef(new WKCACFRootLayer(renderer));
}
- virtual void setNeedsRender() { m_renderer->renderSoon(); }
+ virtual void setNeedsRender() { m_renderer->layerTreeDidChange(); }
// Overload this to avoid calling setNeedsDisplay on the layer, which would override the contents
// we have placed on the root layer.
}
}
+void WKCACFLayerRenderer::layerTreeDidChange()
+{
+ WKCACFContextFlusher::shared().addContext(m_context.get());
+ renderSoon();
+}
+
void WKCACFLayerRenderer::setNeedsDisplay()
{
ASSERT(m_rootLayer);
void setRootContents(CGImageRef);
void setRootContentsAndDisplay(CGImageRef);
void setRootChildLayer(WKCACFLayer* layer);
+ void layerTreeDidChange();
void setNeedsDisplay();
void setHostWindow(HWND window) { m_hostWindow = window; }
void setBackingStoreDirty(bool dirty) { m_backingStoreDirty = dirty; }