summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2012-07-26 16:18:42 -0700
committerChris Craik <ccraik@google.com>2012-07-27 13:21:13 -0700
commitb7c99a422b6cb00661fd3e81cb0608d4b3034124 (patch)
treeae609c17be8f2b8547bf6a9193051310e098320b
parent2bbb442aa27ea29ef6337eba9021ea509400cb84 (diff)
downloadexternal_webkit-b7c99a422b6cb00661fd3e81cb0608d4b3034124.zip
external_webkit-b7c99a422b6cb00661fd3e81cb0608d4b3034124.tar.gz
external_webkit-b7c99a422b6cb00661fd3e81cb0608d4b3034124.tar.bz2
Fix background tiles drawing
Bug:6875992 Initialize the InstrumentedPlatformCanvas with the correct background color so that if no painting is done, the background color is returned as the pure color. Change-Id: Ibe928a4e158f0a4302e0996eca88c3e8b1f1b666
-rw-r--r--Source/WebCore/platform/graphics/android/rendering/BaseRenderer.cpp4
-rw-r--r--Source/WebCore/platform/graphics/android/rendering/InstrumentedPlatformCanvas.h4
2 files changed, 5 insertions, 3 deletions
diff --git a/Source/WebCore/platform/graphics/android/rendering/BaseRenderer.cpp b/Source/WebCore/platform/graphics/android/rendering/BaseRenderer.cpp
index 65e28f9..0ab72b7 100644
--- a/Source/WebCore/platform/graphics/android/rendering/BaseRenderer.cpp
+++ b/Source/WebCore/platform/graphics/android/rendering/BaseRenderer.cpp
@@ -95,8 +95,10 @@ void BaseRenderer::renderTiledContent(TileRenderInfo& renderInfo)
const bool visualIndicator = TilesManager::instance()->getShowVisualIndicator();
const SkSize& tileSize = renderInfo.tileSize;
+ Color *background = renderInfo.tilePainter->background();
InstrumentedPlatformCanvas canvas(TilesManager::instance()->tileWidth(),
- TilesManager::instance()->tileHeight());
+ TilesManager::instance()->tileHeight(),
+ background ? *background : Color::transparent);
setupCanvas(renderInfo, &canvas);
if (!canvas.getDevice()) {
diff --git a/Source/WebCore/platform/graphics/android/rendering/InstrumentedPlatformCanvas.h b/Source/WebCore/platform/graphics/android/rendering/InstrumentedPlatformCanvas.h
index faa5bcd..508795a 100644
--- a/Source/WebCore/platform/graphics/android/rendering/InstrumentedPlatformCanvas.h
+++ b/Source/WebCore/platform/graphics/android/rendering/InstrumentedPlatformCanvas.h
@@ -36,10 +36,10 @@ namespace WebCore {
class InstrumentedPlatformCanvas : public SkCanvas {
public:
- InstrumentedPlatformCanvas(int width, int height)
+ InstrumentedPlatformCanvas(int width, int height, Color initialColor)
: m_size(width, height)
, m_isSolidColor(true)
- , m_solidColor(0, 0, 0, 0)
+ , m_solidColor(initialColor)
{
}