Skip to content
Permalink
Browse files
[TexMap] A Minor optimization of GraphicsLayerTransform.
https://bugs.webkit.org/show_bug.cgi?id=105758

Patch by Huang Dongsung <luxtella@company100.net> on 2012-12-26
Reviewed by Noam Rosenthal.

Only multiply the transformation matrices if the paramaters are actually
changed.

This optimizes the code path called from flushCompositingStateForThisLayerOnly(),
and potentially setAnimatedTransform().

No new tests. Refactoring only.

* platform/graphics/GraphicsLayerTransform.cpp:
(WebCore::GraphicsLayerTransform::setPosition):
(WebCore::GraphicsLayerTransform::setSize):
(WebCore::GraphicsLayerTransform::setAnchorPoint):
(WebCore::GraphicsLayerTransform::setFlattening):
(WebCore::GraphicsLayerTransform::setLocalTransform):
(WebCore::GraphicsLayerTransform::setChildrenTransform):

Canonical link: https://commits.webkit.org/123971@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@138487 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Dongseong Hwang authored and webkit-commit-queue committed Dec 27, 2012
1 parent 53cde09 commit e02b94f1f43373b509b26f146066e715fb1e076c
Showing 2 changed files with 35 additions and 0 deletions.
@@ -1,3 +1,26 @@
2012-12-26 Huang Dongsung <luxtella@company100.net>

[TexMap] A Minor optimization of GraphicsLayerTransform.
https://bugs.webkit.org/show_bug.cgi?id=105758

Reviewed by Noam Rosenthal.

Only multiply the transformation matrices if the paramaters are actually
changed.

This optimizes the code path called from flushCompositingStateForThisLayerOnly(),
and potentially setAnimatedTransform().

No new tests. Refactoring only.

* platform/graphics/GraphicsLayerTransform.cpp:
(WebCore::GraphicsLayerTransform::setPosition):
(WebCore::GraphicsLayerTransform::setSize):
(WebCore::GraphicsLayerTransform::setAnchorPoint):
(WebCore::GraphicsLayerTransform::setFlattening):
(WebCore::GraphicsLayerTransform::setLocalTransform):
(WebCore::GraphicsLayerTransform::setChildrenTransform):

2012-12-26 Huang Dongsung <luxtella@company100.net>

[TexMap] Remove unused members and methods in TextureMapperLayer.
@@ -31,36 +31,48 @@ GraphicsLayerTransform::GraphicsLayerTransform()

void GraphicsLayerTransform::setPosition(const FloatPoint& position)
{
if (m_position == position)
return;
m_position = position;
m_dirty = true;
}

void GraphicsLayerTransform::setSize(const FloatSize& size)
{
if (m_size == size)
return;
m_size = size;
m_dirty = true;
}

void GraphicsLayerTransform::setAnchorPoint(const FloatPoint3D& anchorPoint)
{
if (m_anchorPoint == anchorPoint)
return;
m_anchorPoint = anchorPoint;
m_dirty = true;
}

void GraphicsLayerTransform::setFlattening(bool flattening)
{
if (m_flattening == flattening)
return;
m_flattening = flattening;
m_dirty = true;
}

void GraphicsLayerTransform::setLocalTransform(const TransformationMatrix& transform)
{
if (m_local == transform)
return;
m_local = transform;
m_dirty = true;
}

void GraphicsLayerTransform::setChildrenTransform(const TransformationMatrix& transform)
{
if (m_children == transform)
return;
m_children = transform;
m_dirty = true;
}

0 comments on commit e02b94f

Please sign in to comment.