Commit 3ab117a8 authored by akling@apple.com's avatar akling@apple.com
Browse files

RenderLayerCompositor::m_renderView should be a reference.

<https://webkit.org/b/120210>

Reviewed by Antti Koivisto.

The RenderLayerCompositor is always created by a RenderView passing itself to the constructor.
By making m_renderView a reference, we flush out some unnecessary null checks.
We also gain a pointer-free path to Settings through m_renderView.frameView().frame().settings()
so we don't have to make those blocks conditional anymore, reducing ambiguity.

* rendering/RenderLayerCompositor.cpp:
* rendering/RenderLayerCompositor.h:
* rendering/RenderView.cpp:
(WebCore::RenderView::compositor):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154489 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 61dc1430
2013-08-23 Andreas Kling <akling@apple.com>
RenderLayerCompositor::m_renderView should be a reference.
<https://webkit.org/b/120210>
Reviewed by Antti Koivisto.
The RenderLayerCompositor is always created by a RenderView passing itself to the constructor.
By making m_renderView a reference, we flush out some unnecessary null checks.
We also gain a pointer-free path to Settings through m_renderView.frameView().frame().settings()
so we don't have to make those blocks conditional anymore, reducing ambiguity.
* rendering/RenderLayerCompositor.cpp:
* rendering/RenderLayerCompositor.h:
* rendering/RenderView.cpp:
(WebCore::RenderView::compositor):
2013-08-23 Andreas Kling <akling@apple.com>
 
RenderView::frameView() should return a reference.
/*
* Copyright (C) 2009 Apple Inc. All rights reserved.
* Copyright (C) 2009, 2013 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
......@@ -96,7 +96,7 @@ typedef unsigned CompositingReasons;
class RenderLayerCompositor : public GraphicsLayerClient, public GraphicsLayerUpdaterClient {
WTF_MAKE_FAST_ALLOCATED;
public:
explicit RenderLayerCompositor(RenderView*);
explicit RenderLayerCompositor(RenderView&);
~RenderLayerCompositor();
// Return true if this RenderView is in "compositing mode" (i.e. has one or more
......@@ -405,7 +405,7 @@ private:
#endif
private:
RenderView* m_renderView;
RenderView& m_renderView;
OwnPtr<GraphicsLayer> m_rootContentLayer;
Timer<RenderLayerCompositor> m_updateCompositingLayersTimer;
......
......@@ -1136,7 +1136,7 @@ bool RenderView::usesCompositing() const
RenderLayerCompositor* RenderView::compositor()
{
if (!m_compositor)
m_compositor = adoptPtr(new RenderLayerCompositor(this));
m_compositor = adoptPtr(new RenderLayerCompositor(*this));
return m_compositor.get();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment