Diff
Modified: trunk/Source/Platform/ChangeLog (125087 => 125088)
--- trunk/Source/Platform/ChangeLog 2012-08-08 21:15:22 UTC (rev 125087)
+++ trunk/Source/Platform/ChangeLog 2012-08-08 21:17:43 UTC (rev 125088)
@@ -1,3 +1,15 @@
+2012-08-07 James Robinson <jam...@chromium.org>
+
+ [chromium] Only use public Platform API in NonCompositedContentHost
+ https://bugs.webkit.org/show_bug.cgi?id=93423
+
+ Reviewed by Adrienne Walker.
+
+ Adds setters to control text antialiasing and checkerboarding behavior for content layers.
+
+ * chromium/public/WebContentLayer.h:
+ (WebContentLayer):
+
2012-08-08 Nate Chapin <jap...@chromium.org>
[chromium] Upstream android's FlingAnimator
Modified: trunk/Source/Platform/chromium/public/WebContentLayer.h (125087 => 125088)
--- trunk/Source/Platform/chromium/public/WebContentLayer.h 2012-08-08 21:15:22 UTC (rev 125087)
+++ trunk/Source/Platform/chromium/public/WebContentLayer.h 2012-08-08 21:17:43 UTC (rev 125088)
@@ -60,6 +60,17 @@
// Set to apply a scale factor used when painting and drawing this layer's content. Defaults to 1.0.
WEBKIT_EXPORT void setContentsScale(float);
+ // Set to render text in this layer with LCD antialiasing. Only set if you know that this layer will be
+ // drawn in a way where this makes sense - i.e. opaque background, not rotated or scaled, etc.
+ // Defaults to false;
+ WEBKIT_EXPORT void setUseLCDText(bool);
+
+ // Set to draw a system-defined checkerboard if the compositor would otherwise draw a tile in this layer
+ // and the actual contents are unavailable. If false, the compositor will draw the layer's background color
+ // for these tiles.
+ // Defaults to false.
+ WEBKIT_EXPORT void setDrawCheckerboardForMissingTiles(bool);
+
#if WEBKIT_IMPLEMENTATION
WebContentLayer(const WTF::PassRefPtr<WebCore::ContentLayerChromium>&);
WebContentLayer& operator=(const WTF::PassRefPtr<WebCore::ContentLayerChromium>&);
Modified: trunk/Source/WebCore/ChangeLog (125087 => 125088)
--- trunk/Source/WebCore/ChangeLog 2012-08-08 21:15:22 UTC (rev 125087)
+++ trunk/Source/WebCore/ChangeLog 2012-08-08 21:17:43 UTC (rev 125088)
@@ -1,3 +1,31 @@
+2012-08-07 James Robinson <jam...@chromium.org>
+
+ [chromium] Only use public Platform API in NonCompositedContentHost
+ https://bugs.webkit.org/show_bug.cgi?id=93423
+
+ Reviewed by Adrienne Walker.
+
+ This renames the "NonCompositedContentHost" flag to "useLCDText", which is the primary purpose of the flag. We
+ also use this flag to control whether we have border texels or not on the "root" layer, but I can't think of a
+ clean name that encapsulates both behaviors.
+
+ * platform/graphics/chromium/LayerChromium.cpp:
+ (WebCore::LayerChromium::LayerChromium):
+ (WebCore::LayerChromium::setUseLCDText):
+ (WebCore::LayerChromium::pushPropertiesTo):
+ * platform/graphics/chromium/LayerChromium.h:
+ (LayerChromium):
+ (WebCore::LayerChromium::useLCDText):
+ * platform/graphics/chromium/TiledLayerChromium.cpp:
+ (WebCore::TiledLayerChromium::setUseLCDText):
+ * platform/graphics/chromium/TiledLayerChromium.h:
+ * platform/graphics/chromium/cc/CCLayerImpl.cpp:
+ (WebCore::CCLayerImpl::CCLayerImpl):
+ * platform/graphics/chromium/cc/CCLayerImpl.h:
+ (WebCore::CCLayerImpl::setUseLCDText):
+ (WebCore::CCLayerImpl::useLCDText):
+ (CCLayerImpl):
+
2012-08-08 Beth Dakin <bda...@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=93393
Modified: trunk/Source/WebCore/platform/graphics/chromium/LayerChromium.cpp (125087 => 125088)
--- trunk/Source/WebCore/platform/graphics/chromium/LayerChromium.cpp 2012-08-08 21:15:22 UTC (rev 125087)
+++ trunk/Source/WebCore/platform/graphics/chromium/LayerChromium.cpp 2012-08-08 21:17:43 UTC (rev 125088)
@@ -78,7 +78,7 @@
, m_masksToBounds(false)
, m_opaque(false)
, m_doubleSided(true)
- , m_isNonCompositedContent(false)
+ , m_useLCDText(false)
, m_preserves3D(false)
, m_useParentBackfaceVisibility(false)
, m_alwaysReserveTextures(false)
@@ -110,9 +110,9 @@
removeAllChildren();
}
-void LayerChromium::setIsNonCompositedContent(bool isNonCompositedContent)
+void LayerChromium::setUseLCDText(bool useLCDText)
{
- m_isNonCompositedContent = isNonCompositedContent;
+ m_useLCDText = useLCDText;
}
void LayerChromium::setLayerTreeHost(CCLayerTreeHost* host)
@@ -544,7 +544,7 @@
layer->setDrawsContent(drawsContent());
layer->setFilters(filters());
layer->setBackgroundFilters(backgroundFilters());
- layer->setIsNonCompositedContent(m_isNonCompositedContent);
+ layer->setUseLCDText(m_useLCDText);
layer->setMasksToBounds(m_masksToBounds);
layer->setScrollable(m_scrollable);
layer->setShouldScrollOnMainThread(m_shouldScrollOnMainThread);
Modified: trunk/Source/WebCore/platform/graphics/chromium/LayerChromium.h (125087 => 125088)
--- trunk/Source/WebCore/platform/graphics/chromium/LayerChromium.h 2012-08-08 21:15:22 UTC (rev 125087)
+++ trunk/Source/WebCore/platform/graphics/chromium/LayerChromium.h 2012-08-08 21:17:43 UTC (rev 125088)
@@ -200,8 +200,8 @@
void setUseParentBackfaceVisibility(bool useParentBackfaceVisibility) { m_useParentBackfaceVisibility = useParentBackfaceVisibility; }
bool useParentBackfaceVisibility() const { return m_useParentBackfaceVisibility; }
- virtual void setIsNonCompositedContent(bool);
- bool isNonCompositedContent() const { return m_isNonCompositedContent; }
+ virtual void setUseLCDText(bool);
+ bool useLCDText() const { return m_useLCDText; }
virtual void setLayerTreeHost(CCLayerTreeHost*);
@@ -377,7 +377,7 @@
bool m_masksToBounds;
bool m_opaque;
bool m_doubleSided;
- bool m_isNonCompositedContent;
+ bool m_useLCDText;
bool m_preserves3D;
bool m_useParentBackfaceVisibility;
bool m_alwaysReserveTextures;
Modified: trunk/Source/WebCore/platform/graphics/chromium/TiledLayerChromium.cpp (125087 => 125088)
--- trunk/Source/WebCore/platform/graphics/chromium/TiledLayerChromium.cpp 2012-08-08 21:15:22 UTC (rev 125087)
+++ trunk/Source/WebCore/platform/graphics/chromium/TiledLayerChromium.cpp 2012-08-08 21:17:43 UTC (rev 125088)
@@ -291,16 +291,16 @@
LayerChromium::setNeedsDisplayRect(dirtyRect);
}
-void TiledLayerChromium::setIsNonCompositedContent(bool isNonCompositedContent)
+void TiledLayerChromium::setUseLCDText(bool useLCDText)
{
- LayerChromium::setIsNonCompositedContent(isNonCompositedContent);
+ LayerChromium::setUseLCDText(useLCDText);
CCLayerTilingData::BorderTexelOption borderTexelOption;
#if OS(ANDROID)
// Always want border texels and GL_LINEAR due to pinch zoom.
borderTexelOption = CCLayerTilingData::HasBorderTexels;
#else
- borderTexelOption = isNonCompositedContent ? CCLayerTilingData::NoBorderTexels : CCLayerTilingData::HasBorderTexels;
+ borderTexelOption = useLCDText ? CCLayerTilingData::NoBorderTexels : CCLayerTilingData::HasBorderTexels;
#endif
setBorderTexelOption(borderTexelOption);
}
Modified: trunk/Source/WebCore/platform/graphics/chromium/TiledLayerChromium.h (125087 => 125088)
--- trunk/Source/WebCore/platform/graphics/chromium/TiledLayerChromium.h 2012-08-08 21:15:22 UTC (rev 125087)
+++ trunk/Source/WebCore/platform/graphics/chromium/TiledLayerChromium.h 2012-08-08 21:17:43 UTC (rev 125088)
@@ -52,7 +52,7 @@
virtual void setNeedsDisplayRect(const FloatRect&) OVERRIDE;
- virtual void setIsNonCompositedContent(bool) OVERRIDE;
+ virtual void setUseLCDText(bool) OVERRIDE;
virtual void setLayerTreeHost(CCLayerTreeHost*) OVERRIDE;
Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerImpl.cpp (125087 => 125088)
--- trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerImpl.cpp 2012-08-08 21:15:22 UTC (rev 125087)
+++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerImpl.cpp 2012-08-08 21:17:43 UTC (rev 125088)
@@ -64,7 +64,7 @@
, m_preserves3D(false)
, m_useParentBackfaceVisibility(false)
, m_drawCheckerboardForMissingTiles(false)
- , m_isNonCompositedContent(false)
+ , m_useLCDText(false)
, m_drawsContent(false)
, m_forceRenderSurface(false)
, m_isContainerForFixedPositionLayers(false)
Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerImpl.h (125087 => 125088)
--- trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerImpl.h 2012-08-08 21:15:22 UTC (rev 125087)
+++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerImpl.h 2012-08-08 21:17:43 UTC (rev 125088)
@@ -150,8 +150,8 @@
void setUseParentBackfaceVisibility(bool useParentBackfaceVisibility) { m_useParentBackfaceVisibility = useParentBackfaceVisibility; }
bool useParentBackfaceVisibility() const { return m_useParentBackfaceVisibility; }
- void setIsNonCompositedContent(bool isNonCompositedContent) { m_isNonCompositedContent = isNonCompositedContent; }
- bool isNonCompositedContent() const { return m_isNonCompositedContent; }
+ void setUseLCDText(bool useLCDText) { m_useLCDText = useLCDText; }
+ bool useLCDText() const { return m_useLCDText; }
void setSublayerTransform(const WebKit::WebTransformationMatrix&);
const WebKit::WebTransformationMatrix& sublayerTransform() const { return m_sublayerTransform; }
@@ -341,7 +341,7 @@
bool m_drawCheckerboardForMissingTiles;
WebKit::WebTransformationMatrix m_sublayerTransform;
WebKit::WebTransformationMatrix m_transform;
- bool m_isNonCompositedContent;
+ bool m_useLCDText;
bool m_drawsContent;
bool m_forceRenderSurface;
Modified: trunk/Source/WebKit/chromium/ChangeLog (125087 => 125088)
--- trunk/Source/WebKit/chromium/ChangeLog 2012-08-08 21:15:22 UTC (rev 125087)
+++ trunk/Source/WebKit/chromium/ChangeLog 2012-08-08 21:17:43 UTC (rev 125088)
@@ -1,3 +1,25 @@
+2012-08-07 James Robinson <jam...@chromium.org>
+
+ [chromium] Only use public Platform API in NonCompositedContentHost
+ https://bugs.webkit.org/show_bug.cgi?id=93423
+
+ Reviewed by Adrienne Walker.
+
+ Switches to using Web*Layer APIs in NonCompositedContentHost instead of reaching in to the LayerChromium and
+ updates unit tests for the nonCompositedContent->useLCDText flag rename.
+
+ * src/NonCompositedContentHost.cpp:
+ (WebKit::NonCompositedContentHost::NonCompositedContentHost):
+ * src/WebContentLayer.cpp:
+ (WebKit::WebContentLayer::setUseLCDText):
+ (WebKit):
+ (WebKit::WebContentLayer::setDrawCheckerboardForMissingTiles):
+ * src/WebViewImpl.cpp:
+ * tests/CCLayerImplTest.cpp:
+ (WebCore::TEST):
+ * tests/CCLayerTreeHostImplTest.cpp:
+ * tests/LayerChromiumTest.cpp:
+
2012-08-08 Alec Flett <alecfl...@chromium.org>
IndexedDB: new enums and openCursor stub
Modified: trunk/Source/WebKit/chromium/src/NonCompositedContentHost.cpp (125087 => 125088)
--- trunk/Source/WebKit/chromium/src/NonCompositedContentHost.cpp 2012-08-08 21:15:22 UTC (rev 125087)
+++ trunk/Source/WebKit/chromium/src/NonCompositedContentHost.cpp 2012-08-08 21:17:43 UTC (rev 125088)
@@ -30,13 +30,11 @@
#include "FloatPoint.h"
#include "FloatRect.h"
#include "GraphicsLayer.h"
-#include "LayerChromium.h"
#include "PlatformContextSkia.h"
#include "WebViewImpl.h"
+#include <public/WebContentLayer.h>
#include <public/WebFloatPoint.h>
-using WebCore::LayerChromium;
-
namespace WebKit {
NonCompositedContentHost::NonCompositedContentHost(WebViewImpl* webView)
@@ -50,10 +48,11 @@
m_graphicsLayer->setName("non-composited content");
#endif
m_graphicsLayer->setDrawsContent(true);
- m_graphicsLayer->platformLayer()->unwrap<LayerChromium>()->setIsNonCompositedContent(true);
- m_graphicsLayer->platformLayer()->setOpaque(true);
+ WebContentLayer layer = m_graphicsLayer->platformLayer()->to<WebContentLayer>();
+ layer.setUseLCDText(true);
+ layer.setOpaque(true);
#if !OS(ANDROID)
- m_graphicsLayer->platformLayer()->unwrap<LayerChromium>()->setDrawCheckerboardForMissingTiles(true);
+ layer.setDrawCheckerboardForMissingTiles(true);
#endif
}
Modified: trunk/Source/WebKit/chromium/src/WebContentLayer.cpp (125087 => 125088)
--- trunk/Source/WebKit/chromium/src/WebContentLayer.cpp 2012-08-08 21:15:22 UTC (rev 125087)
+++ trunk/Source/WebKit/chromium/src/WebContentLayer.cpp 2012-08-08 21:17:43 UTC (rev 125088)
@@ -53,6 +53,16 @@
m_private->setContentsScale(scale);
}
+void WebContentLayer::setUseLCDText(bool enable)
+{
+ m_private->setUseLCDText(enable);
+}
+
+void WebContentLayer::setDrawCheckerboardForMissingTiles(bool enable)
+{
+ m_private->setDrawCheckerboardForMissingTiles(enable);
+}
+
WebContentLayer::WebContentLayer(const PassRefPtr<ContentLayerChromium>& node)
: WebScrollableLayer(node)
{
Modified: trunk/Source/WebKit/chromium/src/WebViewImpl.cpp (125087 => 125088)
--- trunk/Source/WebKit/chromium/src/WebViewImpl.cpp 2012-08-08 21:15:22 UTC (rev 125087)
+++ trunk/Source/WebKit/chromium/src/WebViewImpl.cpp 2012-08-08 21:17:43 UTC (rev 125088)
@@ -147,7 +147,6 @@
#include "WebTouchCandidatesInfo.h"
#include "WebViewClient.h"
#include "WheelEvent.h"
-#include "cc/CCSettings.h"
#include "painting/GraphicsContextBuilder.h"
#include <public/Platform.h>
#include <public/WebCompositor.h>
Modified: trunk/Source/WebKit/chromium/tests/CCLayerImplTest.cpp (125087 => 125088)
--- trunk/Source/WebKit/chromium/tests/CCLayerImplTest.cpp 2012-08-08 21:15:22 UTC (rev 125087)
+++ trunk/Source/WebKit/chromium/tests/CCLayerImplTest.cpp 2012-08-08 21:17:43 UTC (rev 125088)
@@ -104,7 +104,7 @@
arbitraryFilters.append(WebFilterOperation::createOpacityFilter(0.5));
// These properties are internal, and should not be considered "change" when they are used.
- EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setIsNonCompositedContent(true));
+ EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setUseLCDText(true));
EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setDrawOpacity(arbitraryNumber));
EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setRenderTarget(0));
EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setDrawTransform(arbitraryTransform));
Modified: trunk/Source/WebKit/chromium/tests/CCLayerTreeHostImplTest.cpp (125087 => 125088)
--- trunk/Source/WebKit/chromium/tests/CCLayerTreeHostImplTest.cpp 2012-08-08 21:15:22 UTC (rev 125087)
+++ trunk/Source/WebKit/chromium/tests/CCLayerTreeHostImplTest.cpp 2012-08-08 21:17:43 UTC (rev 125088)
@@ -843,7 +843,7 @@
IntSize surfaceSize(10, 10);
OwnPtr<CCLayerImpl> contentLayer = CCLayerImpl::create(1);
- contentLayer->setIsNonCompositedContent(true);
+ contentLayer->setUseLCDText(true);
contentLayer->setDrawsContent(true);
contentLayer->setPosition(FloatPoint(0, 0));
contentLayer->setAnchorPoint(FloatPoint(0, 0));
Modified: trunk/Source/WebKit/chromium/tests/LayerChromiumTest.cpp (125087 => 125088)
--- trunk/Source/WebKit/chromium/tests/LayerChromiumTest.cpp 2012-08-08 21:15:22 UTC (rev 125087)
+++ trunk/Source/WebKit/chromium/tests/LayerChromiumTest.cpp 2012-08-08 21:17:43 UTC (rev 125088)
@@ -495,7 +495,7 @@
// Test properties that should not call needsDisplay and needsCommit when changed.
EXECUTE_AND_VERIFY_SET_NEEDS_COMMIT_BEHAVIOR(0, testLayer->setVisibleContentRect(IntRect(0, 0, 40, 50)));
- EXECUTE_AND_VERIFY_SET_NEEDS_COMMIT_BEHAVIOR(0, testLayer->setIsNonCompositedContent(true));
+ EXECUTE_AND_VERIFY_SET_NEEDS_COMMIT_BEHAVIOR(0, testLayer->setUseLCDText(true));
EXECUTE_AND_VERIFY_SET_NEEDS_COMMIT_BEHAVIOR(0, testLayer->setDrawOpacity(0.5));
EXECUTE_AND_VERIFY_SET_NEEDS_COMMIT_BEHAVIOR(0, testLayer->setRenderTarget(0));
EXECUTE_AND_VERIFY_SET_NEEDS_COMMIT_BEHAVIOR(0, testLayer->setDrawTransform(WebTransformationMatrix()));