summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/graphics/android
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2012-04-10 16:41:51 -0700
committerChris Craik <ccraik@google.com>2012-04-10 16:44:42 -0700
commitceac2217dad840ce8d690923219b51787083bb44 (patch)
treeb35543ee8a4ee883fb41e3f285219ed24ad20b79 /Source/WebCore/platform/graphics/android
parent98e8504d9f510b8cbaca1b0144efea3a4d1a8eec (diff)
downloadexternal_webkit-ceac2217dad840ce8d690923219b51787083bb44.zip
external_webkit-ceac2217dad840ce8d690923219b51787083bb44.tar.gz
external_webkit-ceac2217dad840ce8d690923219b51787083bb44.tar.bz2
Treat image texture TileGrids as non-base surfaces
Was ignoring transform calculation bug:6317028 Change-Id: I9d5d491ef9eb853535e18a8ad10ab387d77e2d80
Diffstat (limited to 'Source/WebCore/platform/graphics/android')
-rw-r--r--Source/WebCore/platform/graphics/android/rendering/ImageTexture.cpp6
-rw-r--r--Source/WebCore/platform/graphics/android/rendering/TileGrid.cpp14
2 files changed, 9 insertions, 11 deletions
diff --git a/Source/WebCore/platform/graphics/android/rendering/ImageTexture.cpp b/Source/WebCore/platform/graphics/android/rendering/ImageTexture.cpp
index b2ead6a..9890331 100644
--- a/Source/WebCore/platform/graphics/android/rendering/ImageTexture.cpp
+++ b/Source/WebCore/platform/graphics/android/rendering/ImageTexture.cpp
@@ -174,8 +174,8 @@ bool ImageTexture::prepareGL(GLWebViewState* state)
return false;
if (!m_texture && m_picture) {
- bool isLayerTile = true;
- m_texture = new TileGrid(isLayerTile);
+ bool isBaseSurface = false;
+ m_texture = new TileGrid(isBaseSurface);
SkRegion region;
region.setRect(0, 0, m_image->width(), m_image->height());
m_texture->markAsDirty(region);
@@ -198,8 +198,6 @@ const TransformationMatrix* ImageTexture::transform()
if (!m_layer)
return 0;
- FloatPoint p(0, 0);
- p = m_layer->drawTransform()->mapPoint(p);
IntRect layerArea = m_layer->unclippedArea();
float scaleW = static_cast<float>(layerArea.width()) / static_cast<float>(m_image->width());
float scaleH = static_cast<float>(layerArea.height()) / static_cast<float>(m_image->height());
diff --git a/Source/WebCore/platform/graphics/android/rendering/TileGrid.cpp b/Source/WebCore/platform/graphics/android/rendering/TileGrid.cpp
index 5ce63bf..146c2db 100644
--- a/Source/WebCore/platform/graphics/android/rendering/TileGrid.cpp
+++ b/Source/WebCore/platform/graphics/android/rendering/TileGrid.cpp
@@ -80,7 +80,7 @@ bool TileGrid::isReady()
// in order to unblock the zooming process.
// FIXME: have a better system -- maybe keeping the last scale factor
// able to fully render everything
- ALOGV("TT %p, ready %d, visible %d, texturesRemain %d",
+ ALOGV("TG %p, ready %d, visible %d, texturesRemain %d",
this, tilesAllReady, tilesVisible,
TilesManager::instance()->layerTexturesRemain());
@@ -102,7 +102,7 @@ void TileGrid::swapTiles()
for (unsigned int i = 0; i < m_tiles.size(); i++)
if (m_tiles[i]->swapTexturesIfNeeded())
swaps++;
- ALOGV("TT %p swapping, swaps = %d", this, swaps);
+ ALOGV("TG %p swapping, swaps = %d", this, swaps);
}
IntRect TileGrid::computeTilesArea(const IntRect& contentArea, float scale)
@@ -113,7 +113,7 @@ IntRect TileGrid::computeTilesArea(const IntRect& contentArea, float scale)
ceilf(contentArea.width() * scale),
ceilf(contentArea.height() * scale));
- ALOGV("TT %p prepare, scale %f, area %d x %d", this, scale, area.width(), area.height());
+ ALOGV("TG %p prepare, scale %f, area %d x %d", this, scale, area.width(), area.height());
if (area.width() == 0 && area.height() == 0) {
computedArea.setWidth(0);
@@ -212,7 +212,7 @@ void TileGrid::prepareGL(GLWebViewState* state, float scale,
void TileGrid::markAsDirty(const SkRegion& invalRegion)
{
- ALOGV("TT %p markAsDirty, current region empty %d, new empty %d",
+ ALOGV("TG %p markAsDirty, current region empty %d, new empty %d",
this, m_dirtyRegion.isEmpty(), invalRegion.isEmpty());
m_dirtyRegion.op(invalRegion, SkRegion::kUnion_Op);
}
@@ -238,7 +238,7 @@ void TileGrid::prepareTile(int x, int y, TilePainter* painter,
tile->reserveTexture();
if (tile->backTexture() && tile->isDirty() && !tile->isRepaintPending()) {
- ALOGV("painting TT %p's tile %d %d for LG %p", this, x, y, painter);
+ ALOGV("painting TG %p's tile %d %d for LG %p", this, x, y, painter);
PaintTileOperation *operation = new PaintTileOperation(tile, painter,
state, isLowResPrefetch);
TilesManager::instance()->scheduleOperation(operation);
@@ -329,7 +329,7 @@ void TileGrid::drawGL(const IntRect& visibleArea, float opacity,
if (semiOpaqueBaseSurface)
drawMissingRegion(missingRegion, opacity, background);
- ALOGV("TT %p drew %d tiles, scale %f",
+ ALOGV("TG %p drew %d tiles, scale %f",
this, drawn, m_scale);
}
@@ -371,7 +371,7 @@ void TileGrid::removeTiles()
void TileGrid::discardTextures()
{
- ALOGV("TT %p discarding textures", this);
+ ALOGV("TG %p discarding textures", this);
for (unsigned int i = 0; i < m_tiles.size(); i++)
m_tiles[i]->discardTextures();
}