Title: [171795] trunk/Source/WebCore
- Revision
- 171795
- Author
- [email protected]
- Date
- 2014-07-30 00:47:33 -0700 (Wed, 30 Jul 2014)
Log Message
[TexMap] Move TextureMapperLayer::textureMapper() definition into the header
https://bugs.webkit.org/show_bug.cgi?id=135384
Reviewed by Martin Robinson.
Move the definitions of TextureMapperLayer::textureMapper() and TextureMapperLayer::rootLayer()
into the TextureMapperLayer header. This makes both functions inline-able, removing unnecessary
calling overhead in GraphicsLayerTextureMapper::flushCompositingState() and
GraphicsLayerTextureMapper::updateBackingStoreIfNeeded().
TextureMapperLayer::rootLayer() now also returns a reference.
* platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperLayer::~TextureMapperLayer):
(WebCore::TextureMapperLayer::rootLayer): Deleted.
(WebCore::TextureMapperLayer::textureMapper): Deleted.
* platform/graphics/texmap/TextureMapperLayer.h:
(WebCore::TextureMapperLayer::textureMapper):
(WebCore::TextureMapperLayer::rootLayer):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (171794 => 171795)
--- trunk/Source/WebCore/ChangeLog 2014-07-30 07:47:22 UTC (rev 171794)
+++ trunk/Source/WebCore/ChangeLog 2014-07-30 07:47:33 UTC (rev 171795)
@@ -1,3 +1,25 @@
+2014-07-30 Zan Dobersek <[email protected]>
+
+ [TexMap] Move TextureMapperLayer::textureMapper() definition into the header
+ https://bugs.webkit.org/show_bug.cgi?id=135384
+
+ Reviewed by Martin Robinson.
+
+ Move the definitions of TextureMapperLayer::textureMapper() and TextureMapperLayer::rootLayer()
+ into the TextureMapperLayer header. This makes both functions inline-able, removing unnecessary
+ calling overhead in GraphicsLayerTextureMapper::flushCompositingState() and
+ GraphicsLayerTextureMapper::updateBackingStoreIfNeeded().
+
+ TextureMapperLayer::rootLayer() now also returns a reference.
+
+ * platform/graphics/texmap/TextureMapperLayer.cpp:
+ (WebCore::TextureMapperLayer::~TextureMapperLayer):
+ (WebCore::TextureMapperLayer::rootLayer): Deleted.
+ (WebCore::TextureMapperLayer::textureMapper): Deleted.
+ * platform/graphics/texmap/TextureMapperLayer.h:
+ (WebCore::TextureMapperLayer::textureMapper):
+ (WebCore::TextureMapperLayer::rootLayer):
+
2014-07-29 Andreas Kling <[email protected]>
Crash when using 'em' units to specify font-size inside animation keyframe.
Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp (171794 => 171795)
--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp 2014-07-30 07:47:22 UTC (rev 171794)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp 2014-07-30 07:47:33 UTC (rev 171795)
@@ -41,15 +41,6 @@
{ }
};
-const TextureMapperLayer* TextureMapperLayer::rootLayer() const
-{
- if (m_effectTarget)
- return m_effectTarget->rootLayer();
- if (m_parent)
- return m_parent->rootLayer();
- return this;
-}
-
void TextureMapperLayer::computeTransformsRecursive()
{
if (m_state.size.isEmpty() && m_state.masksToBounds)
@@ -467,11 +458,6 @@
removeFromParent();
}
-TextureMapper* TextureMapperLayer::textureMapper() const
-{
- return rootLayer()->m_textureMapper;
-}
-
void TextureMapperLayer::setChildren(const Vector<TextureMapperLayer*>& newChildren)
{
removeAllChildren();
Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.h (171794 => 171795)
--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.h 2014-07-30 07:47:22 UTC (rev 171794)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.h 2014-07-30 07:47:33 UTC (rev 171795)
@@ -74,7 +74,7 @@
void setIsScrollable(bool isScrollable) { m_isScrollable = isScrollable; }
bool isScrollable() const { return m_isScrollable; }
- TextureMapper* textureMapper() const;
+ TextureMapper* textureMapper() const { return rootLayer().m_textureMapper; }
void setTextureMapper(TextureMapper* texmap) { m_textureMapper = texmap; }
void setChildren(const Vector<TextureMapperLayer*>&);
@@ -134,7 +134,14 @@
void addChild(TextureMapperLayer*);
private:
- const TextureMapperLayer* rootLayer() const;
+ const TextureMapperLayer& rootLayer() const
+ {
+ if (m_effectTarget)
+ return m_effectTarget->rootLayer();
+ if (m_parent)
+ return m_parent->rootLayer();
+ return *this;
+ }
void computeTransformsRecursive();
static int compareGraphicsLayersZValue(const void* a, const void* b);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes