summaryrefslogtreecommitdiffstats
path: root/Source/WebCore
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2012-04-11 12:56:27 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-04-11 12:56:27 -0700
commit083c893085f553eb655abcfffbfaccd06a48943d (patch)
treec8e25f394c7714b15c32d00e873533e0f1e4d790 /Source/WebCore
parent5fd5a776055b86a8ec9587f7d0f924f39ca532b0 (diff)
parentceac2217dad840ce8d690923219b51787083bb44 (diff)
downloadexternal_webkit-083c893085f553eb655abcfffbfaccd06a48943d.zip
external_webkit-083c893085f553eb655abcfffbfaccd06a48943d.tar.gz
external_webkit-083c893085f553eb655abcfffbfaccd06a48943d.tar.bz2
Merge "Treat image texture TileGrids as non-base surfaces"
Diffstat (limited to 'Source/WebCore')
-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 63f73aa..2510d52 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);
@@ -213,7 +213,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);
}
@@ -239,7 +239,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);
@@ -330,7 +330,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);
}
@@ -372,7 +372,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();
}