[Chromium] Enable deferred canvas rendering in the skia port
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 1 Feb 2012 23:05:31 +0000 (23:05 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 1 Feb 2012 23:05:31 +0000 (23:05 +0000)
commite6b1ee9f960b739b188cd384050f670803428931
tree2fd67588c5dfa3ea0f0c60492f7162fd86fc296d
parent4a5d785e57506258565ef895684be0e83f7c5bad
[Chromium] Enable deferred canvas rendering in the skia port
https://bugs.webkit.org/show_bug.cgi?id=76732

Patch by Justin Novosad <junov@chromium.org> on 2012-02-01
Reviewed by Stephen White.

Source/WebCore:

No new tests: covered by existing canvas layout tests

Adding a new setting to enable deferred 2d canvas rendering.
Added support for deferred 2d canvas rendering in ImageBufferSkia
and Canvas2DLayerChromium, mostly plumbing. Deffered rendering
implementation is provided by skia (class SkDeferredCanvas).

* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::shouldDefer):
(WebCore):
(WebCore::HTMLCanvasElement::createImageBuffer):
* html/HTMLCanvasElement.h:
(HTMLCanvasElement):
* page/Settings.cpp:
(WebCore::Settings::Settings):
(WebCore::Settings::setAccelerated2dCanvasEnabled):
(WebCore):
(WebCore::Settings::setDeferred2dCanvasEnabled):
* page/Settings.h:
(Settings):
(WebCore::Settings::deferred2dCanvasEnabled):
* platform/graphics/ImageBuffer.h:
(WebCore::ImageBuffer::create):
(ImageBuffer):
* platform/graphics/cairo/ImageBufferCairo.cpp:
(WebCore::ImageBuffer::ImageBuffer):
* platform/graphics/cg/ImageBufferCG.cpp:
(WebCore::ImageBuffer::ImageBuffer):
* platform/graphics/chromium/Canvas2DLayerChromium.cpp:
(WebCore::Canvas2DLayerChromium::Canvas2DLayerChromium):
(WebCore):
(WebCore::Canvas2DLayerChromium::setCanvas):
(WebCore::Canvas2DLayerChromium::paintContentsIfDirty):
* platform/graphics/chromium/Canvas2DLayerChromium.h:
(Canvas2DLayerChromium):
* platform/graphics/qt/ImageBufferQt.cpp:
(WebCore::ImageBuffer::ImageBuffer):
* platform/graphics/skia/ImageBufferSkia.cpp:
(AcceleratedDeviceContext):
(WebCore::AcceleratedDeviceContext::AcceleratedDeviceContext):
(WebCore::AcceleratedDeviceContext::prepareForDraw):
(WebCore::AcceleratedDeviceContext::flush):
(WebCore):
(WebCore::createAcceleratedCanvas):
(WebCore::ImageBuffer::ImageBuffer):
* platform/graphics/wince/ImageBufferWinCE.cpp:
(WebCore::ImageBuffer::ImageBuffer):
* platform/graphics/wx/ImageBufferWx.cpp:
(WebCore::ImageBuffer::ImageBuffer):

Source/WebKit/chromium:

Adding a new setting for enabling deferred 2d canvas rendering

* public/WebSettings.h:
* src/WebSettingsImpl.cpp:
(WebKit::WebSettingsImpl::setDeferred2dCanvasEnabled):
(WebKit):
* src/WebSettingsImpl.h:
(WebSettingsImpl):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@106500 268f45cc-cd09-0410-ab3c-d52691b4dbfc
18 files changed:
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLCanvasElement.cpp
Source/WebCore/html/HTMLCanvasElement.h
Source/WebCore/page/Settings.cpp
Source/WebCore/page/Settings.h
Source/WebCore/platform/graphics/ImageBuffer.h
Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp
Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp
Source/WebCore/platform/graphics/chromium/Canvas2DLayerChromium.cpp
Source/WebCore/platform/graphics/chromium/Canvas2DLayerChromium.h
Source/WebCore/platform/graphics/qt/ImageBufferQt.cpp
Source/WebCore/platform/graphics/skia/ImageBufferSkia.cpp
Source/WebCore/platform/graphics/wince/ImageBufferWinCE.cpp
Source/WebCore/platform/graphics/wx/ImageBufferWx.cpp
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/public/WebSettings.h
Source/WebKit/chromium/src/WebSettingsImpl.cpp
Source/WebKit/chromium/src/WebSettingsImpl.h