summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2012-04-13 12:52:38 -0700
committerChris Craik <ccraik@google.com>2012-04-13 13:09:16 -0700
commit64d72d82692e48f595e7a31ac2a1680f11d9186b (patch)
treeaabe87e5c157d02146411f1a76410fbfdd4b32c9 /Source
parent85213faae54abd12e8debbf768235403a22faa03 (diff)
downloadexternal_webkit-64d72d82692e48f595e7a31ac2a1680f11d9186b.zip
external_webkit-64d72d82692e48f595e7a31ac2a1680f11d9186b.tar.gz
external_webkit-64d72d82692e48f595e7a31ac2a1680f11d9186b.tar.bz2
remove several unneeded variables/parameters
Change-Id: I862487e8700a408e9e2f7f4dc7d034674ac454d0
Diffstat (limited to 'Source')
-rw-r--r--Source/WebCore/platform/graphics/android/GLWebViewState.cpp2
-rw-r--r--Source/WebCore/platform/graphics/android/GLWebViewState.h4
-rw-r--r--Source/WebCore/platform/graphics/android/rendering/BaseRenderer.cpp2
-rw-r--r--Source/WebCore/platform/graphics/android/rendering/ImageTexture.cpp4
-rw-r--r--Source/WebCore/platform/graphics/android/rendering/ImageTexture.h2
-rw-r--r--Source/WebCore/platform/graphics/android/rendering/Surface.cpp2
-rw-r--r--Source/WebCore/platform/graphics/android/rendering/Surface.h2
-rw-r--r--Source/WebCore/platform/graphics/android/rendering/SurfaceCollectionManager.cpp11
-rw-r--r--Source/WebCore/platform/graphics/android/rendering/SurfaceCollectionManager.h6
-rw-r--r--Source/WebCore/platform/graphics/android/rendering/TileGrid.cpp1
-rw-r--r--Source/WebCore/platform/graphics/android/rendering/TilePainter.h3
-rw-r--r--Source/WebCore/platform/graphics/android/rendering/TileTexture.cpp6
-rw-r--r--Source/WebCore/platform/graphics/android/rendering/TileTexture.h4
13 files changed, 16 insertions, 33 deletions
diff --git a/Source/WebCore/platform/graphics/android/GLWebViewState.cpp b/Source/WebCore/platform/graphics/android/GLWebViewState.cpp
index 1b0513b..9c7038f 100644
--- a/Source/WebCore/platform/graphics/android/GLWebViewState.cpp
+++ b/Source/WebCore/platform/graphics/android/GLWebViewState.cpp
@@ -70,7 +70,7 @@ GLWebViewState::GLWebViewState()
, m_goingLeft(false)
, m_scale(1)
, m_layersRenderingMode(kAllTextures)
- , m_surfaceCollectionManager(this)
+ , m_surfaceCollectionManager()
{
m_viewport.setEmpty();
diff --git a/Source/WebCore/platform/graphics/android/GLWebViewState.h b/Source/WebCore/platform/graphics/android/GLWebViewState.h
index 6d969dd..2b28619 100644
--- a/Source/WebCore/platform/graphics/android/GLWebViewState.h
+++ b/Source/WebCore/platform/graphics/android/GLWebViewState.h
@@ -192,10 +192,6 @@ public:
bool goingDown() { return m_goingDown; }
bool goingLeft() { return m_goingLeft; }
- void setDirection(bool goingDown, bool goingLeft) {
- m_goingDown = goingDown;
- m_goingLeft = goingLeft;
- }
float scale() { return m_scale; }
diff --git a/Source/WebCore/platform/graphics/android/rendering/BaseRenderer.cpp b/Source/WebCore/platform/graphics/android/rendering/BaseRenderer.cpp
index 833aea9..8bb1755 100644
--- a/Source/WebCore/platform/graphics/android/rendering/BaseRenderer.cpp
+++ b/Source/WebCore/platform/graphics/android/rendering/BaseRenderer.cpp
@@ -112,7 +112,7 @@ void BaseRenderer::renderTiledContent(TileRenderInfo& renderInfo)
setupPartialInval(renderInfo, &canvas);
canvas.translate(-renderInfo.x * tileSize.width(), -renderInfo.y * tileSize.height());
canvas.scale(renderInfo.scale, renderInfo.scale);
- renderInfo.tilePainter->paint(renderInfo.baseTile, &canvas);
+ renderInfo.tilePainter->paint(&canvas);
if (renderInfo.baseTile && renderInfo.baseTile->backTexture())
checkForPureColor(renderInfo, &canvas);
else
diff --git a/Source/WebCore/platform/graphics/android/rendering/ImageTexture.cpp b/Source/WebCore/platform/graphics/android/rendering/ImageTexture.cpp
index 9890331..cd43c03 100644
--- a/Source/WebCore/platform/graphics/android/rendering/ImageTexture.cpp
+++ b/Source/WebCore/platform/graphics/android/rendering/ImageTexture.cpp
@@ -215,14 +215,14 @@ float ImageTexture::opacity()
return m_layer->drawOpacity();
}
-bool ImageTexture::paint(Tile* tile, SkCanvas* canvas)
+bool ImageTexture::paint(SkCanvas* canvas)
{
if (!m_picture) {
ALOGV("IT %p COULDNT PAINT, NO PICTURE", this);
return false;
}
- ALOGV("IT %p painting tile %d, %d with picture %p", this, tile->x(), tile->y(), m_picture);
+ ALOGV("IT %p painting with picture %p", this, m_picture);
canvas->drawPicture(*m_picture);
return true;
diff --git a/Source/WebCore/platform/graphics/android/rendering/ImageTexture.h b/Source/WebCore/platform/graphics/android/rendering/ImageTexture.h
index 34430f1..9e1de32 100644
--- a/Source/WebCore/platform/graphics/android/rendering/ImageTexture.h
+++ b/Source/WebCore/platform/graphics/android/rendering/ImageTexture.h
@@ -86,7 +86,7 @@ public:
bool equalsCRC(unsigned crc);
// methods used by TileGrid
- virtual bool paint(Tile* tile, SkCanvas* canvas);
+ virtual bool paint(SkCanvas* canvas);
virtual float opacity();
int nbTextures();
diff --git a/Source/WebCore/platform/graphics/android/rendering/Surface.cpp b/Source/WebCore/platform/graphics/android/rendering/Surface.cpp
index f0d9e58..8f1596d 100644
--- a/Source/WebCore/platform/graphics/android/rendering/Surface.cpp
+++ b/Source/WebCore/platform/graphics/android/rendering/Surface.cpp
@@ -298,7 +298,7 @@ bool Surface::isBase()
return getFirstLayer()->subclassType() == LayerAndroid::BaseLayer;
}
-bool Surface::paint(Tile* tile, SkCanvas* canvas)
+bool Surface::paint(SkCanvas* canvas)
{
if (singleLayer()) {
getFirstLayer()->contentDraw(canvas, Layer::UnmergedLayers);
diff --git a/Source/WebCore/platform/graphics/android/rendering/Surface.h b/Source/WebCore/platform/graphics/android/rendering/Surface.h
index d197d43..0fced47 100644
--- a/Source/WebCore/platform/graphics/android/rendering/Surface.h
+++ b/Source/WebCore/platform/graphics/android/rendering/Surface.h
@@ -63,7 +63,7 @@ public:
bool isBase();
// TilePainter methods
- virtual bool paint(Tile* tile, SkCanvas* canvas);
+ virtual bool paint(SkCanvas* canvas);
virtual float opacity();
virtual Color* background();
diff --git a/Source/WebCore/platform/graphics/android/rendering/SurfaceCollectionManager.cpp b/Source/WebCore/platform/graphics/android/rendering/SurfaceCollectionManager.cpp
index 8c9cad5..52a8e44 100644
--- a/Source/WebCore/platform/graphics/android/rendering/SurfaceCollectionManager.cpp
+++ b/Source/WebCore/platform/graphics/android/rendering/SurfaceCollectionManager.cpp
@@ -36,9 +36,8 @@
namespace WebCore {
-SurfaceCollectionManager::SurfaceCollectionManager(GLWebViewState* state)
- : m_state(state)
- , m_drawingCollection(0)
+SurfaceCollectionManager::SurfaceCollectionManager()
+ : m_drawingCollection(0)
, m_paintingCollection(0)
, m_queuedCollection(0)
, m_fastSwapMode(false)
@@ -59,8 +58,6 @@ void SurfaceCollectionManager::swap()
// swap can't be called unless painting just finished
ASSERT(m_paintingCollection);
- android::Mutex::Autolock lock(m_paintSwapLock);
-
ALOGV("SWAPPING, D %p, P %p, Q %p",
m_drawingCollection, m_paintingCollection, m_queuedCollection);
@@ -90,8 +87,6 @@ void SurfaceCollectionManager::swap()
// clear all of the content in the three collections held by the collection manager
void SurfaceCollectionManager::clearCollections()
{
- ALOGV("SurfaceCollectionManager %p removing PS from state %p", this, m_state);
-
SkSafeUnref(m_drawingCollection);
m_drawingCollection = 0;
SkSafeUnref(m_paintingCollection);
@@ -109,8 +104,6 @@ bool SurfaceCollectionManager::updateWithSurfaceCollection(SurfaceCollection* ne
// can't have a queued collection unless have a painting collection too
ASSERT(m_paintingCollection || !m_queuedCollection);
- android::Mutex::Autolock lock(m_paintSwapLock);
-
if (!newCollection || brandNew) {
clearCollections();
if (brandNew) {
diff --git a/Source/WebCore/platform/graphics/android/rendering/SurfaceCollectionManager.h b/Source/WebCore/platform/graphics/android/rendering/SurfaceCollectionManager.h
index cc98899..125bf02 100644
--- a/Source/WebCore/platform/graphics/android/rendering/SurfaceCollectionManager.h
+++ b/Source/WebCore/platform/graphics/android/rendering/SurfaceCollectionManager.h
@@ -41,7 +41,7 @@ class SurfaceCollection;
class TEST_EXPORT SurfaceCollectionManager {
public:
- SurfaceCollectionManager(GLWebViewState* state);
+ SurfaceCollectionManager();
~SurfaceCollectionManager();
@@ -58,10 +58,6 @@ private:
void swap();
void clearCollections();
- android::Mutex m_paintSwapLock;
-
- GLWebViewState* m_state;
-
SurfaceCollection* m_drawingCollection;
SurfaceCollection* m_paintingCollection;
SurfaceCollection* m_queuedCollection;
diff --git a/Source/WebCore/platform/graphics/android/rendering/TileGrid.cpp b/Source/WebCore/platform/graphics/android/rendering/TileGrid.cpp
index a58a1d2..85bdf29 100644
--- a/Source/WebCore/platform/graphics/android/rendering/TileGrid.cpp
+++ b/Source/WebCore/platform/graphics/android/rendering/TileGrid.cpp
@@ -341,7 +341,6 @@ void TileGrid::drawMissingRegion(const SkRegion& region, float opacity,
SkRegion::Iterator iterator(region);
const float tileWidth = TilesManager::tileWidth() / m_scale;
const float tileHeight = TilesManager::tileHeight() / m_scale;
- ShaderProgram* shader = TilesManager::instance()->shader();
while (!iterator.done()) {
SkIRect r = iterator.rect();
SkRect rect;
diff --git a/Source/WebCore/platform/graphics/android/rendering/TilePainter.h b/Source/WebCore/platform/graphics/android/rendering/TilePainter.h
index d992aee..53dfadc 100644
--- a/Source/WebCore/platform/graphics/android/rendering/TilePainter.h
+++ b/Source/WebCore/platform/graphics/android/rendering/TilePainter.h
@@ -33,14 +33,13 @@ class SkCanvas;
namespace WebCore {
-class Tile;
class Color;
class TilePainter : public SkRefCnt {
// TODO: investigate webkit threadsafe ref counting
public:
virtual ~TilePainter() { }
- virtual bool paint(Tile* tile, SkCanvas* canvas) = 0;
+ virtual bool paint(SkCanvas* canvas) = 0;
virtual float opacity() { return 1.0; }
enum SurfaceType { Painted, Image };
virtual SurfaceType type() { return Painted; }
diff --git a/Source/WebCore/platform/graphics/android/rendering/TileTexture.cpp b/Source/WebCore/platform/graphics/android/rendering/TileTexture.cpp
index 39effd7..126a7ac 100644
--- a/Source/WebCore/platform/graphics/android/rendering/TileTexture.cpp
+++ b/Source/WebCore/platform/graphics/android/rendering/TileTexture.cpp
@@ -77,15 +77,15 @@ void TileTexture::discardGLTexture()
}
}
-bool TileTexture::acquire(TextureOwner* owner, bool force)
+bool TileTexture::acquire(TextureOwner* owner)
{
if (m_owner == owner)
return true;
- return setOwner(owner, force);
+ return setOwner(owner);
}
-bool TileTexture::setOwner(TextureOwner* owner, bool force)
+bool TileTexture::setOwner(TextureOwner* owner)
{
bool proceed = true;
if (m_owner && m_owner != owner)
diff --git a/Source/WebCore/platform/graphics/android/rendering/TileTexture.h b/Source/WebCore/platform/graphics/android/rendering/TileTexture.h
index 5fe43b0..b008b7d 100644
--- a/Source/WebCore/platform/graphics/android/rendering/TileTexture.h
+++ b/Source/WebCore/platform/graphics/android/rendering/TileTexture.h
@@ -51,11 +51,11 @@ public:
// allows consumer thread to assign ownership of the texture to the tile. It
// returns false if ownership cannot be transferred because the tile is busy
- bool acquire(TextureOwner* owner, bool force = false);
+ bool acquire(TextureOwner* owner);
bool release(TextureOwner* owner);
// set the texture owner if not busy. Return false if busy, true otherwise.
- bool setOwner(TextureOwner* owner, bool force = false);
+ bool setOwner(TextureOwner* owner);
// private member accessor functions
TextureOwner* owner() { return m_owner; } // only used by the consumer thread