summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/graphics/android/rendering
diff options
context:
space:
mode:
authorNicolas Roard <nicolasroard@google.com>2012-05-04 16:06:30 -0700
committerNicolas Roard <nicolasroard@google.com>2012-05-08 18:02:56 -0700
commit576098317db607e1d3b32a0e53d2551ea0e7ef21 (patch)
tree144b1667bb6f1d4ef0e1c2ec02d4049d4558571a /Source/WebCore/platform/graphics/android/rendering
parent35caaaf726b8b17cec92747a1fe42dba44d6b775 (diff)
downloadexternal_webkit-576098317db607e1d3b32a0e53d2551ea0e7ef21.zip
external_webkit-576098317db607e1d3b32a0e53d2551ea0e7ef21.tar.gz
external_webkit-576098317db607e1d3b32a0e53d2551ea0e7ef21.tar.bz2
Complete implementation fixed background
- extract image for body background (a lot more memory-friendly) - implement tiling / repeat - handles background color bug:1352305 Change-Id: I0efa27e09416e3c3848a4a53ced650cbb3d9f7ce
Diffstat (limited to 'Source/WebCore/platform/graphics/android/rendering')
-rw-r--r--Source/WebCore/platform/graphics/android/rendering/ImageTexture.cpp8
-rw-r--r--Source/WebCore/platform/graphics/android/rendering/ImageTexture.h2
-rw-r--r--Source/WebCore/platform/graphics/android/rendering/Surface.cpp2
3 files changed, 8 insertions, 4 deletions
diff --git a/Source/WebCore/platform/graphics/android/rendering/ImageTexture.cpp b/Source/WebCore/platform/graphics/android/rendering/ImageTexture.cpp
index 2ec78d2..2819baa 100644
--- a/Source/WebCore/platform/graphics/android/rendering/ImageTexture.cpp
+++ b/Source/WebCore/platform/graphics/android/rendering/ImageTexture.cpp
@@ -228,7 +228,8 @@ bool ImageTexture::paint(SkCanvas* canvas)
return true;
}
-void ImageTexture::drawGL(LayerAndroid* layer, float opacity)
+void ImageTexture::drawGL(LayerAndroid* layer,
+ float opacity, FloatPoint* offset)
{
if (!layer)
return;
@@ -241,7 +242,10 @@ void ImageTexture::drawGL(LayerAndroid* layer, float opacity)
if (m_tileGrid) {
bool force3dContentVisible = true;
IntRect visibleContentArea = m_layer->visibleContentArea(force3dContentVisible);
- m_tileGrid->drawGL(visibleContentArea, opacity, transform());
+ const TransformationMatrix* transformation = transform();
+ if (offset)
+ m_layerMatrix.translate(offset->x(), offset->y());
+ m_tileGrid->drawGL(visibleContentArea, opacity, transformation);
}
m_layer = 0;
}
diff --git a/Source/WebCore/platform/graphics/android/rendering/ImageTexture.h b/Source/WebCore/platform/graphics/android/rendering/ImageTexture.h
index fccbb78..0571b83 100644
--- a/Source/WebCore/platform/graphics/android/rendering/ImageTexture.h
+++ b/Source/WebCore/platform/graphics/android/rendering/ImageTexture.h
@@ -74,7 +74,7 @@ public:
virtual ~ImageTexture();
bool prepareGL(GLWebViewState*);
- void drawGL(LayerAndroid* layer, float opacity);
+ void drawGL(LayerAndroid* layer, float opacity, FloatPoint* offset = 0);
void drawCanvas(SkCanvas*, SkRect&);
bool hasContentToShow();
SkBitmap* bitmap() { return m_image; }
diff --git a/Source/WebCore/platform/graphics/android/rendering/Surface.cpp b/Source/WebCore/platform/graphics/android/rendering/Surface.cpp
index 173b8af..7dd16dc 100644
--- a/Source/WebCore/platform/graphics/android/rendering/Surface.cpp
+++ b/Source/WebCore/platform/graphics/android/rendering/Surface.cpp
@@ -231,7 +231,7 @@ bool Surface::drawGL(bool layerTilesDisabled)
return false;
bool isBaseLayer = isBase()
- || getFirstLayer()->subclassType() == LayerAndroid::FixedBackgroundBaseLayer
+ || getFirstLayer()->subclassType() == LayerAndroid::FixedBackgroundImageLayer
|| getFirstLayer()->subclassType() == LayerAndroid::ForegroundBaseLayer;
if (!isBaseLayer) {