Log Message
[chromium] Revise zoom animator backend to use full transform instead of just scale. https://bugs.webkit.org/show_bug.cgi?id=68535
Reviewed by Kenneth Russell. Source/WebCore: * page/Settings.cpp: (WebCore::Settings::Settings): * page/Settings.h: (WebCore::Settings::setZoomAnimatorScale): (WebCore::Settings::zoomAnimatorScale): (WebCore::Settings::setZoomAnimatorPosition): (WebCore::Settings::zoomAnimatorPosX): (WebCore::Settings::zoomAnimatorPosY): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::LayerRendererChromium): (WebCore::LayerRendererChromium::drawLayersInternal): * platform/graphics/chromium/LayerRendererChromium.h: (WebCore::LayerRendererChromium::setZoomAnimatorTransform): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::CCLayerTreeHost): (WebCore::CCLayerTreeHost::commitTo): (WebCore::CCLayerTreeHost::setZoomAnimatorTransform): (WebCore::CCLayerTreeHost::updateLayers): * platform/graphics/chromium/cc/CCLayerTreeHost.h: * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::setZoomAnimatorTransform): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: * testing/Internals.cpp: (WebCore::Internals::setZoomAnimatorTransform): * testing/Internals.h: * testing/Internals.idl: Source/WebKit/chromium: * src/WebViewImpl.cpp: (WebKit::WebViewImpl::setZoomLevel): (WebKit::WebViewImpl::setRootLayerNeedsDisplay): LayoutTests: * platform/chromium-gpu-linux/platform/chromium/compositing/zoom-animator-scale-test-expected.png: Added. * platform/chromium/compositing/zoom-animator-scale-test.html:
Modified Paths
- trunk/LayoutTests/ChangeLog
- trunk/LayoutTests/platform/chromium/compositing/zoom-animator-scale-test.html
- trunk/Source/WebCore/ChangeLog
- trunk/Source/WebCore/page/Settings.cpp
- trunk/Source/WebCore/page/Settings.h
- trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp
- trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.h
- trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp
- trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.h
- trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp
- trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.h
- trunk/Source/WebCore/testing/Internals.cpp
- trunk/Source/WebCore/testing/Internals.h
- trunk/Source/WebCore/testing/Internals.idl
- trunk/Source/WebKit/chromium/ChangeLog
- trunk/Source/WebKit/chromium/src/WebViewImpl.cpp
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (95987 => 95988)
--- trunk/LayoutTests/ChangeLog 2011-09-26 20:28:07 UTC (rev 95987)
+++ trunk/LayoutTests/ChangeLog 2011-09-26 20:31:12 UTC (rev 95988)
@@ -1,3 +1,13 @@
+2011-09-26 W. James MacLean <[email protected]>
+
+ [chromium] Revise zoom animator backend to use full transform instead of just scale.
+ https://bugs.webkit.org/show_bug.cgi?id=68535
+
+ Reviewed by Kenneth Russell.
+
+ * platform/chromium-gpu-linux/platform/chromium/compositing/zoom-animator-scale-test-expected.png: Added.
+ * platform/chromium/compositing/zoom-animator-scale-test.html:
+
2011-09-26 Mihai Parparita <[email protected]>
Layout Test fast/animation/request-animation-frame-timestamps-advance.html is failing
Modified: trunk/LayoutTests/platform/chromium/compositing/zoom-animator-scale-test.html (95987 => 95988)
--- trunk/LayoutTests/platform/chromium/compositing/zoom-animator-scale-test.html 2011-09-26 20:28:07 UTC (rev 95987)
+++ trunk/LayoutTests/platform/chromium/compositing/zoom-animator-scale-test.html 2011-09-26 20:31:12 UTC (rev 95988)
@@ -3,7 +3,7 @@
<script>
if (window.internals) {
window.internals.setForceCompositingMode(document, true);
- window.internals.setZoomAnimatorScale(document, 1.25);
+ window.internals.setZoomAnimatorTransform(document, 1.25, -25.0, -25.0);
}
if (window.layoutTestController) {
window.layoutTestController.dumpAsText(true);
Added: trunk/LayoutTests/platform/chromium-gpu-linux/platform/chromium/compositing/zoom-animator-scale-test-expected.png (0 => 95988)
--- trunk/LayoutTests/platform/chromium-gpu-linux/platform/chromium/compositing/zoom-animator-scale-test-expected.png (rev 0)
+++ trunk/LayoutTests/platform/chromium-gpu-linux/platform/chromium/compositing/zoom-animator-scale-test-expected.png 2011-09-26 20:31:12 UTC (rev 95988)
@@ -0,0 +1,7 @@
+\x89PNG
+
+
+IHDR X ' )tEXtchecksum 2426f31ce3ad36a6e0bcbb70501b37b0&\xA4\xA4\xFA
+\xC0IDATx\x9C\xED\xD8\xD1 QA\x9F\x98\xB7\xF9^B\xC3\xE2Y\xC1|6sf\xE6 @\xE7\xB9= \xE0n @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4^\xDB~\xC9\xF9\x9C\xED \xFFh= \xBE\xE3\xC1 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80ؙ\x99\xED
+ \xB7\xE2\xC1 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\x98\xC0 \x88 , \x80\xD8\xBD4
+\xABW\xB9L IEND\xAEB`\x82
\ No newline at end of file
Modified: trunk/Source/WebCore/ChangeLog (95987 => 95988)
--- trunk/Source/WebCore/ChangeLog 2011-09-26 20:28:07 UTC (rev 95987)
+++ trunk/Source/WebCore/ChangeLog 2011-09-26 20:31:12 UTC (rev 95988)
@@ -1,3 +1,37 @@
+2011-09-26 W. James MacLean <[email protected]>
+
+ [chromium] Revise zoom animator backend to use full transform instead of just scale.
+ https://bugs.webkit.org/show_bug.cgi?id=68535
+
+ Reviewed by Kenneth Russell.
+
+ * page/Settings.cpp:
+ (WebCore::Settings::Settings):
+ * page/Settings.h:
+ (WebCore::Settings::setZoomAnimatorScale):
+ (WebCore::Settings::zoomAnimatorScale):
+ (WebCore::Settings::setZoomAnimatorPosition):
+ (WebCore::Settings::zoomAnimatorPosX):
+ (WebCore::Settings::zoomAnimatorPosY):
+ * platform/graphics/chromium/LayerRendererChromium.cpp:
+ (WebCore::LayerRendererChromium::LayerRendererChromium):
+ (WebCore::LayerRendererChromium::drawLayersInternal):
+ * platform/graphics/chromium/LayerRendererChromium.h:
+ (WebCore::LayerRendererChromium::setZoomAnimatorTransform):
+ * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
+ (WebCore::CCLayerTreeHost::CCLayerTreeHost):
+ (WebCore::CCLayerTreeHost::commitTo):
+ (WebCore::CCLayerTreeHost::setZoomAnimatorTransform):
+ (WebCore::CCLayerTreeHost::updateLayers):
+ * platform/graphics/chromium/cc/CCLayerTreeHost.h:
+ * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
+ (WebCore::CCLayerTreeHostImpl::setZoomAnimatorTransform):
+ * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
+ * testing/Internals.cpp:
+ (WebCore::Internals::setZoomAnimatorTransform):
+ * testing/Internals.h:
+ * testing/Internals.idl:
+
2011-09-26 Dan Bernstein <[email protected]>
REGRESSION (r95926) Assert firing in svg/clip-path/clip-path-on-svg.svg
Modified: trunk/Source/WebCore/page/Settings.cpp (95987 => 95988)
--- trunk/Source/WebCore/page/Settings.cpp 2011-09-26 20:28:07 UTC (rev 95987)
+++ trunk/Source/WebCore/page/Settings.cpp 2011-09-26 20:31:12 UTC (rev 95988)
@@ -219,6 +219,8 @@
, m_passwordEchoEnabled(false)
, m_loadsImagesAutomaticallyTimer(this, &Settings::loadsImagesAutomaticallyTimerFired)
, m_zoomAnimatorScale(1)
+ , m_zoomAnimatorPosX(0)
+ , m_zoomAnimatorPosY(0)
{
// A Frame may not have been created yet, so we initialize the AtomicString
// hash before trying to use it.
Modified: trunk/Source/WebCore/page/Settings.h (95987 => 95988)
--- trunk/Source/WebCore/page/Settings.h 2011-09-26 20:28:07 UTC (rev 95987)
+++ trunk/Source/WebCore/page/Settings.h 2011-09-26 20:31:12 UTC (rev 95988)
@@ -432,9 +432,13 @@
void setForceCompositingMode(bool flag) { m_forceCompositingMode = flag; }
bool forceCompositingMode() { return m_forceCompositingMode; }
- void setZoomAnimatorScale(double scale) { m_zoomAnimatorScale = scale; }
- double zoomAnimatorScale() { return m_zoomAnimatorScale; }
+ void setZoomAnimatorScale(float scale) { m_zoomAnimatorScale = scale; }
+ float zoomAnimatorScale() { return m_zoomAnimatorScale; }
+ void setZoomAnimatorPosition(float x, float y) { m_zoomAnimatorPosX = x; m_zoomAnimatorPosY = y; }
+ float zoomAnimatorPosX() { return m_zoomAnimatorPosX; }
+ float zoomAnimatorPosY() { return m_zoomAnimatorPosY; }
+
void setShouldInjectUserScriptsInInitialEmptyDocument(bool flag) { m_shouldInjectUserScriptsInInitialEmptyDocument = flag; }
bool shouldInjectUserScriptsInInitialEmptyDocument() { return m_shouldInjectUserScriptsInInitialEmptyDocument; }
@@ -603,7 +607,9 @@
#endif
static bool gMockScrollbarsEnabled;
- double m_zoomAnimatorScale;
+ float m_zoomAnimatorScale;
+ float m_zoomAnimatorPosX;
+ float m_zoomAnimatorPosY;
#if USE(SAFARI_THEME)
static bool gShouldPaintNativeControls;
Modified: trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp (95987 => 95988)
--- trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp 2011-09-26 20:28:07 UTC (rev 95987)
+++ trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp 2011-09-26 20:31:12 UTC (rev 95988)
@@ -147,7 +147,6 @@
: m_owner(owner)
, m_currentRenderSurface(0)
, m_offscreenFramebufferId(0)
- , m_zoomAnimatorScale(1)
, m_contentsTextureMemoryUseBytes(0)
, m_context(context)
, m_defaultRenderSurface(0)
@@ -267,14 +266,12 @@
CCLayerList renderSurfaceLayerList;
renderSurfaceLayerList.append(rootDrawLayer);
- TransformationMatrix zoomMatrix;
- zoomMatrix.scale3d(m_zoomAnimatorScale, m_zoomAnimatorScale, 1);
m_defaultRenderSurface = rootDrawLayer->renderSurface();
m_defaultRenderSurface->clearLayerList();
{
TRACE_EVENT("LayerRendererChromium::drawLayersInternal::calcDrawEtc", this, 0);
- CCLayerTreeHostCommon::calculateDrawTransformsAndVisibility(rootDrawLayer, rootDrawLayer, zoomMatrix, zoomMatrix, renderSurfaceLayerList, m_defaultRenderSurface->layerList(), &m_layerSorter, m_capabilities.maxTextureSize);
+ CCLayerTreeHostCommon::calculateDrawTransformsAndVisibility(rootDrawLayer, rootDrawLayer, m_zoomAnimatorTransform, m_zoomAnimatorTransform, renderSurfaceLayerList, m_defaultRenderSurface->layerList(), &m_layerSorter, m_capabilities.maxTextureSize);
}
// The GL viewport covers the entire visible area, including the scrollbars.
@@ -290,8 +287,13 @@
useRenderSurface(m_defaultRenderSurface);
- // Clear to blue to make it easier to spot unrendered regions.
- m_context->clearColor(0, 0, 1, 1);
+ if (m_zoomAnimatorTransform.isIdentity())
+ // Clear to blue to make it easier to spot unrendered regions.
+ m_context->clearColor(0, 0, 1, 1);
+ else
+ // Clear to grey, as zoom animation may leave unrendered regions.
+ // FIXME(wjmaclean): Render some interesting texture in unrendered regions.
+ m_context->clearColor(0.25, 0.25, 0.25, 1);
m_context->colorMask(true, true, true, true);
m_context->clear(GraphicsContext3D::COLOR_BUFFER_BIT);
Modified: trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.h (95987 => 95988)
--- trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.h 2011-09-26 20:28:07 UTC (rev 95987)
+++ trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.h 2011-09-26 20:31:12 UTC (rev 95988)
@@ -103,7 +103,7 @@
// puts backbuffer onscreen
void present();
- void setZoomAnimatorScale(double factor) { m_zoomAnimatorScale = factor; }
+ void setZoomAnimatorTransform(const TransformationMatrix& t) { m_zoomAnimatorTransform = t; }
unsigned createLayerTexture();
void deleteLayerTexture(unsigned);
@@ -191,7 +191,7 @@
CCRenderSurface* m_currentRenderSurface;
unsigned m_offscreenFramebufferId;
- double m_zoomAnimatorScale;
+ TransformationMatrix m_zoomAnimatorTransform;
// Store values that are shared between instances of each layer type
// associated with this instance of the compositor. Since there can be
Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp (95987 => 95988)
--- trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp 2011-09-26 20:28:07 UTC (rev 95987)
+++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp 2011-09-26 20:31:12 UTC (rev 95988)
@@ -53,7 +53,6 @@
, m_frameNumber(0)
, m_rootLayer(rootLayer)
, m_settings(settings)
- , m_zoomAnimatorScale(1)
, m_visible(true)
{
}
@@ -119,7 +118,7 @@
clearPendingUpdate();
hostImpl->setVisible(m_visible);
- hostImpl->setZoomAnimatorScale(m_zoomAnimatorScale);
+ hostImpl->setZoomAnimatorTransform(m_zoomAnimatorTransform);
hostImpl->setViewport(viewportSize());
hostImpl->layerRenderer()->setContentsTextureMemoryUseBytes(m_contentsTextureManager->currentMemoryUseBytes());
@@ -187,11 +186,11 @@
return m_proxy->layerRendererCapabilities();
}
-void CCLayerTreeHost::setZoomAnimatorScale(double zoom)
+void CCLayerTreeHost::setZoomAnimatorTransform(const TransformationMatrix& zoom)
{
- bool zoomChanged = m_zoomAnimatorScale != zoom;
+ bool zoomChanged = m_zoomAnimatorTransform != zoom;
- m_zoomAnimatorScale = zoom;
+ m_zoomAnimatorTransform = zoom;
if (zoomChanged)
setNeedsCommitAndRedraw();
@@ -283,11 +282,9 @@
RenderSurfaceChromium* rootRenderSurface = rootLayer->renderSurface();
rootRenderSurface->clearLayerList();
- TransformationMatrix zoomMatrix;
- zoomMatrix.scale3d(m_zoomAnimatorScale, m_zoomAnimatorScale, 1);
{
TRACE_EVENT("CCLayerTreeHost::updateLayers::calcDrawEtc", this, 0);
- CCLayerTreeHostCommon::calculateDrawTransformsAndVisibility(rootLayer, rootLayer, zoomMatrix, zoomMatrix, m_updateList, rootRenderSurface->layerList(), layerRendererCapabilities().maxTextureSize);
+ CCLayerTreeHostCommon::calculateDrawTransformsAndVisibility(rootLayer, rootLayer, m_zoomAnimatorTransform, m_zoomAnimatorTransform, m_updateList, rootRenderSurface->layerList(), layerRendererCapabilities().maxTextureSize);
}
paintLayerContents(m_updateList);
Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.h (95987 => 95988)
--- trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.h 2011-09-26 20:28:07 UTC (rev 95987)
+++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.h 2011-09-26 20:31:12 UTC (rev 95988)
@@ -27,6 +27,7 @@
#include "GraphicsTypes3D.h"
#include "IntRect.h"
+#include "TransformationMatrix.h"
#include "cc/CCProxy.h"
#include <wtf/PassOwnPtr.h>
@@ -126,7 +127,7 @@
int frameNumber() const { return m_frameNumber; }
- void setZoomAnimatorScale(double);
+ void setZoomAnimatorTransform(const TransformationMatrix&);
const LayerRendererCapabilities& layerRendererCapabilities() const;
@@ -181,7 +182,7 @@
CCSettings m_settings;
IntSize m_viewportSize;
- double m_zoomAnimatorScale;
+ TransformationMatrix m_zoomAnimatorTransform;
bool m_visible;
};
Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp (95987 => 95988)
--- trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp 2011-09-26 20:28:07 UTC (rev 95987)
+++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp 2011-09-26 20:31:12 UTC (rev 95988)
@@ -151,9 +151,9 @@
m_layerRenderer->viewportChanged();
}
-void CCLayerTreeHostImpl::setZoomAnimatorScale(double zoom)
+void CCLayerTreeHostImpl::setZoomAnimatorTransform(const TransformationMatrix& zoom)
{
- m_layerRenderer->setZoomAnimatorScale(zoom);
+ m_layerRenderer->setZoomAnimatorTransform(zoom);
}
}
Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.h (95987 => 95988)
--- trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.h 2011-09-26 20:28:07 UTC (rev 95987)
+++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.h 2011-09-26 20:31:12 UTC (rev 95988)
@@ -38,6 +38,7 @@
class CCLayerImpl;
class LayerRendererChromium;
struct LayerRendererCapabilities;
+class TransformationMatrix;
// CCLayerTreeHostImpl owns the CCLayerImpl tree as well as associated rendering state
class CCLayerTreeHostImpl {
@@ -75,7 +76,7 @@
void setViewport(const IntSize& viewportSize);
const IntSize& viewportSize() const { return m_viewportSize; }
- void setZoomAnimatorScale(double);
+ void setZoomAnimatorTransform(const TransformationMatrix&);
const CCSettings& settings() const { return m_settings; }
protected:
Modified: trunk/Source/WebCore/testing/Internals.cpp (95987 => 95988)
--- trunk/Source/WebCore/testing/Internals.cpp 2011-09-26 20:28:07 UTC (rev 95987)
+++ trunk/Source/WebCore/testing/Internals.cpp 2011-09-26 20:31:12 UTC (rev 95988)
@@ -244,7 +244,7 @@
document->settings()->setForceCompositingMode(enabled);
}
-void Internals::setZoomAnimatorScale(Document *document, double scale, ExceptionCode& ec)
+void Internals::setZoomAnimatorTransform(Document *document, double scale, double tx, double ty, ExceptionCode& ec)
{
if (!document || !document->settings()) {
ec = INVALID_ACCESS_ERR;
@@ -252,6 +252,7 @@
}
document->settings()->setZoomAnimatorScale(scale);
+ document->settings()->setZoomAnimatorPosition(tx, ty);
}
void Internals::setPasswordEchoEnabled(Document* document, bool enabled, ExceptionCode& ec)
Modified: trunk/Source/WebCore/testing/Internals.h (95987 => 95988)
--- trunk/Source/WebCore/testing/Internals.h 2011-09-26 20:28:07 UTC (rev 95987)
+++ trunk/Source/WebCore/testing/Internals.h 2011-09-26 20:31:12 UTC (rev 95988)
@@ -77,7 +77,7 @@
PassRefPtr<Range> markerRangeForNode(Node*, unsigned, ExceptionCode&);
void setForceCompositingMode(Document*, bool enabled, ExceptionCode&);
- void setZoomAnimatorScale(Document*, double scale, ExceptionCode&);
+ void setZoomAnimatorTransform(Document*, double scale, double tx, double ty, ExceptionCode&);
void setPasswordEchoEnabled(Document*, bool enabled, ExceptionCode&);
void setPasswordEchoDurationInSeconds(Document*, double durationInSeconds, ExceptionCode&);
Modified: trunk/Source/WebCore/testing/Internals.idl (95987 => 95988)
--- trunk/Source/WebCore/testing/Internals.idl 2011-09-26 20:28:07 UTC (rev 95987)
+++ trunk/Source/WebCore/testing/Internals.idl 2011-09-26 20:31:12 UTC (rev 95988)
@@ -51,7 +51,7 @@
Range markerRangeForNode(in Node node, in unsigned long index) raises(DOMException);
void setForceCompositingMode(in Document document, in boolean enabled) raises(DOMException);
- void setZoomAnimatorScale(in Document document, in double scale) raises(DOMException);
+ void setZoomAnimatorTransform(in Document document, in double scale, in double tx, in double ty) raises(DOMException);
void setPasswordEchoEnabled(in Document document, in boolean enabled) raises(DOMException);
void setPasswordEchoDurationInSeconds(in Document document, in double durationInSeconds) raises(DOMException);
Modified: trunk/Source/WebKit/chromium/ChangeLog (95987 => 95988)
--- trunk/Source/WebKit/chromium/ChangeLog 2011-09-26 20:28:07 UTC (rev 95987)
+++ trunk/Source/WebKit/chromium/ChangeLog 2011-09-26 20:31:12 UTC (rev 95988)
@@ -1,3 +1,14 @@
+2011-09-26 W. James MacLean <[email protected]>
+
+ [chromium] Revise zoom animator backend to use full transform instead of just scale.
+ https://bugs.webkit.org/show_bug.cgi?id=68535
+
+ Reviewed by Kenneth Russell.
+
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::setZoomLevel):
+ (WebKit::WebViewImpl::setRootLayerNeedsDisplay):
+
2011-09-26 Sheriff Bot <[email protected]>
Unreviewed, rolling out r95256.
Modified: trunk/Source/WebKit/chromium/src/WebViewImpl.cpp (95987 => 95988)
--- trunk/Source/WebKit/chromium/src/WebViewImpl.cpp 2011-09-26 20:28:07 UTC (rev 95987)
+++ trunk/Source/WebKit/chromium/src/WebViewImpl.cpp 2011-09-26 20:31:12 UTC (rev 95988)
@@ -1832,7 +1832,7 @@
double WebViewImpl::setZoomLevel(bool textOnly, double zoomLevel)
{
if (m_layerTreeHost)
- m_layerTreeHost->setZoomAnimatorScale(1);
+ m_layerTreeHost->setZoomAnimatorTransform(TransformationMatrix());
if (zoomLevel < m_minimumZoomLevel)
m_zoomLevel = m_minimumZoomLevel;
@@ -2566,8 +2566,12 @@
void WebViewImpl::setRootLayerNeedsDisplay()
{
- if (m_layerTreeHost)
- m_layerTreeHost->setZoomAnimatorScale(m_page->settings()->zoomAnimatorScale());
+ if (m_layerTreeHost) {
+ TransformationMatrix zoomMatrix;
+ zoomMatrix.translate(m_page->settings()->zoomAnimatorPosX(), m_page->settings()->zoomAnimatorPosY());
+ zoomMatrix.scale(m_page->settings()->zoomAnimatorScale());
+ m_layerTreeHost->setZoomAnimatorTransform(zoomMatrix);
+ }
#if USE(THREADED_COMPOSITING)
if (m_layerTreeHost)
m_layerTreeHost->setNeedsCommitAndRedraw();
_______________________________________________ webkit-changes mailing list [email protected] http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
