[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
kbr at google.com
kbr at google.com
Wed Dec 22 13:58:08 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 73bbe7bc936c594a51525708006d1a61e4bc3509
Author: kbr at google.com <kbr at google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Sep 30 17:36:33 2010 +0000
2010-09-29 Kenneth Russell <kbr at google.com>
Reviewed by Dimitri Glazkov.
[chromium] Add accelerated compositing support to DumpRenderTree and test_shell
https://bugs.webkit.org/show_bug.cgi?id=46849
Added offscreen code path for WebGraphicsContext3DDefaultImpl which
works with the compositor integration in both DumpRenderTree and
test_shell, since both pass a non-null WebCanvas* to WebViewImpl::paint
and thereby trigger the compositor's readback code path. Added support
for --enable-accelerated-compositing to DumpRenderTree.
Tested in both test_shell and DumpRenderTree on Linux, the latter by
modifying a compositing layout test, dumping the pixels and verifying
that they matched the output when the compositor was active.
* src/WebGraphicsContext3DDefaultImpl.cpp:
(WebKit::WebGraphicsContext3DDefaultImpl::WebGraphicsContext3DDefaultImpl):
(WebKit::WebGraphicsContext3DDefaultImpl::initialize):
(WebKit::WebGraphicsContext3DDefaultImpl::resolveMultisampledFramebuffer):
(WebKit::WebGraphicsContext3DDefaultImpl::getPlatformTextureId):
(WebKit::WebGraphicsContext3DDefaultImpl::prepareTexture):
(WebKit::WebGraphicsContext3DDefaultImpl::readBackFramebuffer):
(WebKit::WebGraphicsContext3DDefaultImpl::copyTexImage2D):
(WebKit::WebGraphicsContext3DDefaultImpl::copyTexSubImage2D):
(WebKit::WebGraphicsContext3DDefaultImpl::readPixels):
* src/WebGraphicsContext3DDefaultImpl.h:
2010-09-29 Kenneth Russell <kbr at google.com>
Reviewed by Dimitri Glazkov.
[chromium] Add accelerated compositing support to DumpRenderTree and test_shell
https://bugs.webkit.org/show_bug.cgi?id=46849
Added offscreen code path for WebGraphicsContext3DDefaultImpl which
works with the compositor integration in both DumpRenderTree and
test_shell, since both pass a non-null WebCanvas* to WebViewImpl::paint
and thereby trigger the compositor's readback code path. Added support
for --enable-accelerated-compositing to DumpRenderTree.
Tested in both test_shell and DumpRenderTree on Linux, the latter by
modifying a compositing layout test, dumping the pixels and verifying
that they matched the output when the compositor was active.
* DumpRenderTree/chromium/DumpRenderTree.cpp:
(main):
* DumpRenderTree/chromium/TestShell.cpp:
(TestShell::TestShell):
(TestShell::resetWebSettings):
* DumpRenderTree/chromium/TestShell.h:
(TestShell::setAcceleratedCompositingEnabled):
* DumpRenderTree/chromium/WebPreferences.cpp:
(WebPreferences::reset):
(WebPreferences::applyTo):
* DumpRenderTree/chromium/WebPreferences.h:
* DumpRenderTree/chromium/WebViewHost.cpp:
(WebViewHost::scheduleComposite):
* DumpRenderTree/chromium/WebViewHost.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68801 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 645a500..724d41a 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,32 @@
+2010-09-29 Kenneth Russell <kbr at google.com>
+
+ Reviewed by Dimitri Glazkov.
+
+ [chromium] Add accelerated compositing support to DumpRenderTree and test_shell
+ https://bugs.webkit.org/show_bug.cgi?id=46849
+
+ Added offscreen code path for WebGraphicsContext3DDefaultImpl which
+ works with the compositor integration in both DumpRenderTree and
+ test_shell, since both pass a non-null WebCanvas* to WebViewImpl::paint
+ and thereby trigger the compositor's readback code path. Added support
+ for --enable-accelerated-compositing to DumpRenderTree.
+
+ Tested in both test_shell and DumpRenderTree on Linux, the latter by
+ modifying a compositing layout test, dumping the pixels and verifying
+ that they matched the output when the compositor was active.
+
+ * src/WebGraphicsContext3DDefaultImpl.cpp:
+ (WebKit::WebGraphicsContext3DDefaultImpl::WebGraphicsContext3DDefaultImpl):
+ (WebKit::WebGraphicsContext3DDefaultImpl::initialize):
+ (WebKit::WebGraphicsContext3DDefaultImpl::resolveMultisampledFramebuffer):
+ (WebKit::WebGraphicsContext3DDefaultImpl::getPlatformTextureId):
+ (WebKit::WebGraphicsContext3DDefaultImpl::prepareTexture):
+ (WebKit::WebGraphicsContext3DDefaultImpl::readBackFramebuffer):
+ (WebKit::WebGraphicsContext3DDefaultImpl::copyTexImage2D):
+ (WebKit::WebGraphicsContext3DDefaultImpl::copyTexSubImage2D):
+ (WebKit::WebGraphicsContext3DDefaultImpl::readPixels):
+ * src/WebGraphicsContext3DDefaultImpl.h:
+
2010-09-29 Jeremy Orlow <jorlow at chromium.org>
Reviewed by Steve Block.
diff --git a/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp b/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp
index 45bc2ee..6f3d33e 100644
--- a/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp
+++ b/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp
@@ -37,6 +37,7 @@
#include "app/gfx/gl/gl_bindings.h"
#include "app/gfx/gl/gl_context.h"
#include "NotImplemented.h"
+#include "WebView.h"
#include <wtf/PassOwnPtr.h>
#include <wtf/text/CString.h>
@@ -67,6 +68,7 @@ WebGraphicsContext3DDefaultImpl::VertexAttribPointerState::VertexAttribPointerSt
WebGraphicsContext3DDefaultImpl::WebGraphicsContext3DDefaultImpl()
: m_initialized(false)
+ , m_renderDirectlyToWebView(false)
, m_texture(0)
, m_fbo(0)
, m_depthStencilBuffer(0)
@@ -112,19 +114,49 @@ WebGraphicsContext3DDefaultImpl::~WebGraphicsContext3DDefaultImpl()
bool WebGraphicsContext3DDefaultImpl::initialize(WebGraphicsContext3D::Attributes attributes, WebView* webView, bool renderDirectlyToWebView)
{
- if (renderDirectlyToWebView) {
- // This mode isn't supported with the in-process implementation yet. (FIXME)
- return false;
- }
-
if (!gfx::GLContext::InitializeOneOff())
return false;
- m_glContext = WTF::adoptPtr(gfx::GLContext::CreateOffscreenGLContext(0));
+ m_renderDirectlyToWebView = renderDirectlyToWebView;
+ gfx::GLContext* shareContext = 0;
+
+ if (!renderDirectlyToWebView) {
+ // Pick up the compositor's context to share resources with.
+ WebGraphicsContext3D* viewContext = webView->graphicsContext3D();
+ if (viewContext) {
+ WebGraphicsContext3DDefaultImpl* contextImpl = static_cast<WebGraphicsContext3DDefaultImpl*>(viewContext);
+ shareContext = contextImpl->m_glContext.get();
+ } else {
+ // The compositor's context didn't get created
+ // successfully, so conceptually there is no way we can
+ // render successfully to the WebView.
+ m_renderDirectlyToWebView = false;
+ }
+ }
+
+ // This implementation always renders offscreen regardless of
+ // whether renderDirectlyToWebView is true. Both DumpRenderTree
+ // and test_shell paint first to an intermediate offscreen buffer
+ // and from there to the window, and WebViewImpl::paint already
+ // correctly handles the case where the compositor is active but
+ // the output needs to go to a WebCanvas.
+ m_glContext = WTF::adoptPtr(gfx::GLContext::CreateOffscreenGLContext(shareContext));
if (!m_glContext)
return false;
m_attributes = attributes;
+
+ // FIXME: for the moment we disable multisampling for the compositor.
+ // It actually works in this implementation, but there are a few
+ // considerations. First, we likely want to reduce the fuzziness in
+ // these tests as much as possible because we want to run pixel tests.
+ // Second, Mesa's multisampling doesn't seem to antialias straight
+ // edges in some CSS 3D samples. Third, we don't have multisampling
+ // support for the compositor in the normal case at the time of this
+ // writing.
+ if (renderDirectlyToWebView)
+ m_attributes.antialias = false;
+
validateAttributes();
glEnable(GL_VERTEX_PROGRAM_POINT_SIZE);
@@ -165,6 +197,18 @@ void WebGraphicsContext3DDefaultImpl::validateAttributes()
m_attributes.premultipliedAlpha = true;
}
+void WebGraphicsContext3DDefaultImpl::resolveMultisampledFramebuffer(unsigned x, unsigned y, unsigned width, unsigned height)
+{
+ if (m_attributes.antialias) {
+ bool mustRestoreFBO = (m_boundFBO != m_multisampleFBO);
+ glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, m_multisampleFBO);
+ glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, m_fbo);
+ glBlitFramebufferEXT(x, y, x + width, y + height, x, y, x + width, y + height, GL_COLOR_BUFFER_BIT, GL_LINEAR);
+ if (mustRestoreFBO)
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_boundFBO);
+ }
+}
+
bool WebGraphicsContext3DDefaultImpl::makeContextCurrent()
{
return m_glContext->MakeCurrent();
@@ -218,13 +262,15 @@ bool WebGraphicsContext3DDefaultImpl::isErrorGeneratedOnOutOfBoundsAccesses()
unsigned int WebGraphicsContext3DDefaultImpl::getPlatformTextureId()
{
- ASSERT_NOT_REACHED();
- return 0;
+ return m_texture;
}
void WebGraphicsContext3DDefaultImpl::prepareTexture()
{
- ASSERT_NOT_REACHED();
+ if (!m_renderDirectlyToWebView) {
+ // We need to prepare our rendering results for the compositor.
+ resolveMultisampledFramebuffer(0, 0, m_cachedWidth, m_cachedHeight);
+ }
}
static int createTextureObject(GLenum target)
@@ -434,19 +480,8 @@ bool WebGraphicsContext3DDefaultImpl::readBackFramebuffer(unsigned char* pixels,
// vertical flip is only a temporary solution anyway until Chrome
// is fully GPU composited, it wasn't worth the complexity.
- bool mustRestoreFBO = false;
- if (m_attributes.antialias) {
- glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, m_multisampleFBO);
- glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, m_fbo);
- glBlitFramebufferEXT(0, 0, m_cachedWidth, m_cachedHeight, 0, 0, m_cachedWidth, m_cachedHeight, GL_COLOR_BUFFER_BIT, GL_LINEAR);
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_fbo);
- mustRestoreFBO = true;
- } else {
- if (m_boundFBO != m_fbo) {
- mustRestoreFBO = true;
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_fbo);
- }
- }
+ resolveMultisampledFramebuffer(0, 0, m_cachedWidth, m_cachedHeight);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_fbo);
GLint packAlignment = 4;
bool mustRestorePackAlignment = false;
@@ -463,8 +498,7 @@ bool WebGraphicsContext3DDefaultImpl::readBackFramebuffer(unsigned char* pixels,
if (mustRestorePackAlignment)
glPixelStorei(GL_PACK_ALIGNMENT, packAlignment);
- if (mustRestoreFBO)
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_boundFBO);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_boundFBO);
#ifdef FLIP_FRAMEBUFFER_VERTICALLY
if (pixels)
@@ -704,16 +738,15 @@ void WebGraphicsContext3DDefaultImpl::copyTexImage2D(unsigned long target, long
{
makeContextCurrent();
- if (m_attributes.antialias && m_boundFBO == m_multisampleFBO) {
- glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, m_multisampleFBO);
- glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, m_fbo);
- glBlitFramebufferEXT(x, y, x + width, y + height, x, y, x + width, y + height, GL_COLOR_BUFFER_BIT, GL_LINEAR);
+ bool needsResolve = (m_attributes.antialias && m_boundFBO == m_multisampleFBO);
+ if (needsResolve) {
+ resolveMultisampledFramebuffer(x, y, width, height);
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_fbo);
}
glCopyTexImage2D(target, level, internalformat, x, y, width, height, border);
- if (m_attributes.antialias && m_boundFBO == m_multisampleFBO)
+ if (needsResolve)
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_boundFBO);
}
@@ -722,16 +755,15 @@ void WebGraphicsContext3DDefaultImpl::copyTexSubImage2D(unsigned long target, lo
{
makeContextCurrent();
- if (m_attributes.antialias && m_boundFBO == m_multisampleFBO) {
- glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, m_multisampleFBO);
- glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, m_fbo);
- glBlitFramebufferEXT(x, y, x + width, y + height, x, y, x + width, y + height, GL_COLOR_BUFFER_BIT, GL_LINEAR);
+ bool needsResolve = (m_attributes.antialias && m_boundFBO == m_multisampleFBO);
+ if (needsResolve) {
+ resolveMultisampledFramebuffer(x, y, width, height);
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_fbo);
}
glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height);
- if (m_attributes.antialias && m_boundFBO == m_multisampleFBO)
+ if (needsResolve)
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_boundFBO);
}
@@ -1105,17 +1137,16 @@ void WebGraphicsContext3DDefaultImpl::readPixels(long x, long y, unsigned long w
// FIXME: remove the two glFlush calls when the driver bug is fixed, i.e.,
// all previous rendering calls should be done before reading pixels.
glFlush();
- if (m_attributes.antialias && m_boundFBO == m_multisampleFBO) {
- glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, m_multisampleFBO);
- glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, m_fbo);
- glBlitFramebufferEXT(x, y, x + width, y + height, x, y, x + width, y + height, GL_COLOR_BUFFER_BIT, GL_LINEAR);
+ bool needsResolve = (m_attributes.antialias && m_boundFBO == m_multisampleFBO);
+ if (needsResolve) {
+ resolveMultisampledFramebuffer(x, y, width, height);
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_fbo);
glFlush();
}
glReadPixels(x, y, width, height, format, type, pixels);
- if (m_attributes.antialias && m_boundFBO == m_multisampleFBO)
+ if (needsResolve)
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_boundFBO);
}
diff --git a/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.h b/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.h
index 319d9d8..106bccb 100644
--- a/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.h
+++ b/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.h
@@ -273,6 +273,8 @@ public:
private:
WebGraphicsContext3D::Attributes m_attributes;
bool m_initialized;
+ bool m_renderDirectlyToWebView;
+
unsigned int m_texture;
unsigned int m_fbo;
unsigned int m_depthStencilBuffer;
@@ -298,6 +300,9 @@ private:
// not be honored based on the capabilities of the OpenGL implementation.
void validateAttributes();
+ // Resolve the given rectangle of the multisampled framebuffer if necessary.
+ void resolveMultisampledFramebuffer(unsigned x, unsigned y, unsigned width, unsigned height);
+
// Note: we aren't currently using this information, but we will
// need to in order to verify that all enabled vertex arrays have
// a valid buffer bound -- to avoid crashes on certain cards.
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index f2ce88a..0163595 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,35 @@
+2010-09-29 Kenneth Russell <kbr at google.com>
+
+ Reviewed by Dimitri Glazkov.
+
+ [chromium] Add accelerated compositing support to DumpRenderTree and test_shell
+ https://bugs.webkit.org/show_bug.cgi?id=46849
+
+ Added offscreen code path for WebGraphicsContext3DDefaultImpl which
+ works with the compositor integration in both DumpRenderTree and
+ test_shell, since both pass a non-null WebCanvas* to WebViewImpl::paint
+ and thereby trigger the compositor's readback code path. Added support
+ for --enable-accelerated-compositing to DumpRenderTree.
+
+ Tested in both test_shell and DumpRenderTree on Linux, the latter by
+ modifying a compositing layout test, dumping the pixels and verifying
+ that they matched the output when the compositor was active.
+
+ * DumpRenderTree/chromium/DumpRenderTree.cpp:
+ (main):
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::TestShell):
+ (TestShell::resetWebSettings):
+ * DumpRenderTree/chromium/TestShell.h:
+ (TestShell::setAcceleratedCompositingEnabled):
+ * DumpRenderTree/chromium/WebPreferences.cpp:
+ (WebPreferences::reset):
+ (WebPreferences::applyTo):
+ * DumpRenderTree/chromium/WebPreferences.h:
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::scheduleComposite):
+ * DumpRenderTree/chromium/WebViewHost.h:
+
2010-09-30 Adam Roben <aroben at apple.com>
Ensure that QueueEngine cleans up its log files when its delegate
diff --git a/WebKitTools/DumpRenderTree/chromium/DumpRenderTree.cpp b/WebKitTools/DumpRenderTree/chromium/DumpRenderTree.cpp
index b2e50f7..72c0c3c 100644
--- a/WebKitTools/DumpRenderTree/chromium/DumpRenderTree.cpp
+++ b/WebKitTools/DumpRenderTree/chromium/DumpRenderTree.cpp
@@ -48,6 +48,7 @@ static const char optionTestShell[] = "--test-shell";
static const char optionAllowExternalPages[] = "--allow-external-pages";
static const char optionStartupDialog[] = "--testshell-startup-dialog";
static const char optionCheckLayoutTestSystemDeps[] = "--check-layout-test-sys-deps";
+static const char optionEnableAcceleratedCompositing[] = "--enable-accelerated-compositing";
static const char optionEnableAccelerated2DCanvas[] = "--enable-accelerated-2d-canvas";
static void runTest(TestShell& shell, TestParams& params, const string& testName, bool testShellMode)
@@ -93,6 +94,7 @@ int main(int argc, char* argv[])
bool testShellMode = false;
bool allowExternalPages = false;
bool startupDialog = false;
+ bool acceleratedCompositingEnabled = false;
bool accelerated2DCanvasEnabled = false;
for (int i = 1; i < argc; ++i) {
string argument(argv[i]);
@@ -114,6 +116,8 @@ int main(int argc, char* argv[])
startupDialog = true;
else if (argument == optionCheckLayoutTestSystemDeps)
exit(checkLayoutTestSystemDependencies() ? EXIT_SUCCESS : EXIT_FAILURE);
+ else if (argument == optionEnableAcceleratedCompositing)
+ acceleratedCompositingEnabled = true;
else if (argument == optionEnableAccelerated2DCanvas)
accelerated2DCanvasEnabled = true;
else if (argument.size() && argument[0] == '-')
@@ -132,6 +136,7 @@ int main(int argc, char* argv[])
{ // Explicit scope for the TestShell instance.
TestShell shell(testShellMode);
shell.setAllowExternalPages(allowExternalPages);
+ shell.setAcceleratedCompositingEnabled(acceleratedCompositingEnabled);
shell.setAccelerated2dCanvasEnabled(accelerated2DCanvasEnabled);
if (serverMode && !tests.size()) {
params.printSeparators = true;
diff --git a/WebKitTools/DumpRenderTree/chromium/TestShell.cpp b/WebKitTools/DumpRenderTree/chromium/TestShell.cpp
index 8c7f9df..28fa287 100644
--- a/WebKitTools/DumpRenderTree/chromium/TestShell.cpp
+++ b/WebKitTools/DumpRenderTree/chromium/TestShell.cpp
@@ -84,6 +84,7 @@ TestShell::TestShell(bool testShellMode)
, m_testShellMode(testShellMode)
, m_devTools(0)
, m_allowExternalPages(false)
+ , m_acceleratedCompositingEnabled(false)
, m_accelerated2dCanvasEnabled(false)
{
WebRuntimeFeatures::enableGeolocation(true);
@@ -156,6 +157,7 @@ void TestShell::closeDevTools()
void TestShell::resetWebSettings(WebView& webView)
{
m_prefs.reset();
+ m_prefs.acceleratedCompositingEnabled = m_acceleratedCompositingEnabled;
m_prefs.accelerated2dCanvasEnabled = m_accelerated2dCanvasEnabled;
m_prefs.applyTo(&webView);
}
diff --git a/WebKitTools/DumpRenderTree/chromium/TestShell.h b/WebKitTools/DumpRenderTree/chromium/TestShell.h
index 4d022dc..a15d9ec 100644
--- a/WebKitTools/DumpRenderTree/chromium/TestShell.h
+++ b/WebKitTools/DumpRenderTree/chromium/TestShell.h
@@ -123,6 +123,7 @@ public:
bool allowExternalPages() const { return m_allowExternalPages; }
void setAllowExternalPages(bool allowExternalPages) { m_allowExternalPages = allowExternalPages; }
+ void setAcceleratedCompositingEnabled(bool enabled) { m_acceleratedCompositingEnabled = enabled; }
void setAccelerated2dCanvasEnabled(bool enabled) { m_accelerated2dCanvasEnabled = enabled; }
#if defined(OS_WIN)
@@ -178,6 +179,7 @@ private:
TestParams m_params;
int m_timeout; // timeout value in millisecond
bool m_allowExternalPages;
+ bool m_acceleratedCompositingEnabled;
bool m_accelerated2dCanvasEnabled;
WebPreferences m_prefs;
diff --git a/WebKitTools/DumpRenderTree/chromium/WebPreferences.cpp b/WebKitTools/DumpRenderTree/chromium/WebPreferences.cpp
index 35247ef..22abdd8 100644
--- a/WebKitTools/DumpRenderTree/chromium/WebPreferences.cpp
+++ b/WebKitTools/DumpRenderTree/chromium/WebPreferences.cpp
@@ -102,6 +102,7 @@ void WebPreferences::reset()
tabsToLinks = false;
hyperlinkAuditingEnabled = false;
+ acceleratedCompositingEnabled = false;
accelerated2dCanvasEnabled = false;
}
@@ -159,10 +160,7 @@ void WebPreferences::applyTo(WebView* webView)
settings->setTextDirectionSubmenuInclusionBehaviorNeverIncluded();
settings->setUsesEncodingDetector(false);
settings->setImagesEnabled(true);
-
- // FIXME: crbug.com/51879
- settings->setAcceleratedCompositingEnabled(false);
-
+ settings->setAcceleratedCompositingEnabled(acceleratedCompositingEnabled);
settings->setAccelerated2dCanvasEnabled(accelerated2dCanvasEnabled);
}
diff --git a/WebKitTools/DumpRenderTree/chromium/WebPreferences.h b/WebKitTools/DumpRenderTree/chromium/WebPreferences.h
index c0ea70f..8b1f8b8 100644
--- a/WebKitTools/DumpRenderTree/chromium/WebPreferences.h
+++ b/WebKitTools/DumpRenderTree/chromium/WebPreferences.h
@@ -77,6 +77,7 @@ struct WebPreferences {
bool tabsToLinks;
bool hyperlinkAuditingEnabled;
bool caretBrowsingEnabled;
+ bool acceleratedCompositingEnabled;
bool accelerated2dCanvasEnabled;
WebPreferences() { reset(); }
diff --git a/WebKitTools/DumpRenderTree/chromium/WebViewHost.cpp b/WebKitTools/DumpRenderTree/chromium/WebViewHost.cpp
index b7fdab9..e3ca85d 100644
--- a/WebKitTools/DumpRenderTree/chromium/WebViewHost.cpp
+++ b/WebKitTools/DumpRenderTree/chromium/WebViewHost.cpp
@@ -594,6 +594,13 @@ void WebViewHost::didScrollRect(int, int, const WebRect& clipRect)
didInvalidateRect(clipRect);
}
+void WebViewHost::scheduleComposite()
+{
+ WebSize widgetSize = webWidget()->size();
+ WebRect clientRect(0, 0, widgetSize.width, widgetSize.height);
+ didInvalidateRect(clientRect);
+}
+
void WebViewHost::didFocus()
{
m_shell->setFocus(webWidget(), true);
diff --git a/WebKitTools/DumpRenderTree/chromium/WebViewHost.h b/WebKitTools/DumpRenderTree/chromium/WebViewHost.h
index bbb132d..7a830a4 100644
--- a/WebKitTools/DumpRenderTree/chromium/WebViewHost.h
+++ b/WebKitTools/DumpRenderTree/chromium/WebViewHost.h
@@ -137,6 +137,7 @@ class WebViewHost : public WebKit::WebViewClient, public WebKit::WebFrameClient,
// WebKit::WebWidgetClient
virtual void didInvalidateRect(const WebKit::WebRect&);
virtual void didScrollRect(int dx, int dy, const WebKit::WebRect&);
+ virtual void scheduleComposite();
virtual void didFocus();
virtual void didBlur();
virtual void didChangeCursor(const WebKit::WebCursorInfo&);
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list