summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorreveman@chromium.org <reveman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-25 03:25:55 +0000
committerreveman@chromium.org <reveman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-25 03:25:55 +0000
commitf33db56b4a1b7b753e09028588b7d670ce5d5b26 (patch)
tree5e1b546c63f145c300808b88be3985c79013707b
parent12066cbcd88f48b5fcf537883b862f454f24ee0b (diff)
downloadchromium_src-f33db56b4a1b7b753e09028588b7d670ce5d5b26.zip
chromium_src-f33db56b4a1b7b753e09028588b7d670ce5d5b26.tar.gz
chromium_src-f33db56b4a1b7b753e09028588b7d670ce5d5b26.tar.bz2
cc: Rename LayerUpdater::Texture to LayerUpdater::Resource.
BUG= TEST=cc_unittests Review URL: https://chromiumcodereview.appspot.com/11236078 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@164007 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--cc/bitmap_canvas_layer_updater.cc12
-rw-r--r--cc/bitmap_canvas_layer_updater.h8
-rw-r--r--cc/bitmap_skpicture_canvas_layer_updater.cc10
-rw-r--r--cc/bitmap_skpicture_canvas_layer_updater.h6
-rw-r--r--cc/image_layer.cc10
-rw-r--r--cc/layer_updater.cc4
-rw-r--r--cc/layer_updater.h10
-rw-r--r--cc/scrollbar_layer.cc8
-rw-r--r--cc/scrollbar_layer.h8
-rw-r--r--cc/skpicture_canvas_layer_updater.cc12
-rw-r--r--cc/skpicture_canvas_layer_updater.h8
-rw-r--r--cc/test/tiled_layer_test_common.cc12
-rw-r--r--cc/test/tiled_layer_test_common.h8
-rw-r--r--cc/tiled_layer.cc20
14 files changed, 68 insertions, 68 deletions
diff --git a/cc/bitmap_canvas_layer_updater.cc b/cc/bitmap_canvas_layer_updater.cc
index eca5e761..625d2c7 100644
--- a/cc/bitmap_canvas_layer_updater.cc
+++ b/cc/bitmap_canvas_layer_updater.cc
@@ -13,17 +13,17 @@
namespace cc {
-BitmapCanvasLayerUpdater::Texture::Texture(BitmapCanvasLayerUpdater* updater, scoped_ptr<PrioritizedTexture> texture)
- : LayerUpdater::Texture(texture.Pass())
+BitmapCanvasLayerUpdater::Resource::Resource(BitmapCanvasLayerUpdater* updater, scoped_ptr<PrioritizedTexture> texture)
+ : LayerUpdater::Resource(texture.Pass())
, m_updater(updater)
{
}
-BitmapCanvasLayerUpdater::Texture::~Texture()
+BitmapCanvasLayerUpdater::Resource::~Resource()
{
}
-void BitmapCanvasLayerUpdater::Texture::update(TextureUpdateQueue& queue, const IntRect& sourceRect, const IntSize& destOffset, bool partialUpdate, RenderingStats&)
+void BitmapCanvasLayerUpdater::Resource::update(TextureUpdateQueue& queue, const IntRect& sourceRect, const IntSize& destOffset, bool partialUpdate, RenderingStats&)
{
updater()->updateTexture(queue, texture(), sourceRect, destOffset, partialUpdate);
}
@@ -43,9 +43,9 @@ BitmapCanvasLayerUpdater::~BitmapCanvasLayerUpdater()
{
}
-scoped_ptr<LayerUpdater::Texture> BitmapCanvasLayerUpdater::createTexture(PrioritizedTextureManager* manager)
+scoped_ptr<LayerUpdater::Resource> BitmapCanvasLayerUpdater::createResource(PrioritizedTextureManager* manager)
{
- return scoped_ptr<LayerUpdater::Texture>(new Texture(this, PrioritizedTexture::create(manager)));
+ return scoped_ptr<LayerUpdater::Resource>(new Resource(this, PrioritizedTexture::create(manager)));
}
void BitmapCanvasLayerUpdater::prepareToUpdate(const IntRect& contentRect, const IntSize& tileSize, float contentsWidthScale, float contentsHeightScale, IntRect& resultingOpaqueRect, RenderingStats& stats)
diff --git a/cc/bitmap_canvas_layer_updater.h b/cc/bitmap_canvas_layer_updater.h
index bd36be2..7e6a17b 100644
--- a/cc/bitmap_canvas_layer_updater.h
+++ b/cc/bitmap_canvas_layer_updater.h
@@ -19,10 +19,10 @@ class LayerPainter;
// possible.
class BitmapCanvasLayerUpdater : public CanvasLayerUpdater {
public:
- class Texture : public LayerUpdater::Texture {
+ class Resource : public LayerUpdater::Resource {
public:
- Texture(BitmapCanvasLayerUpdater*, scoped_ptr<PrioritizedTexture>);
- virtual ~Texture();
+ Resource(BitmapCanvasLayerUpdater*, scoped_ptr<PrioritizedTexture>);
+ virtual ~Resource();
virtual void update(TextureUpdateQueue&, const IntRect& sourceRect, const IntSize& destOffset, bool partialUpdate, RenderingStats&) OVERRIDE;
@@ -34,7 +34,7 @@ public:
static scoped_refptr<BitmapCanvasLayerUpdater> create(scoped_ptr<LayerPainter>);
- virtual scoped_ptr<LayerUpdater::Texture> createTexture(PrioritizedTextureManager*) OVERRIDE;
+ virtual scoped_ptr<LayerUpdater::Resource> createResource(PrioritizedTextureManager*) OVERRIDE;
virtual void prepareToUpdate(const IntRect& contentRect, const IntSize& tileSize, float contentsWidthScale, float contentsHeightScale, IntRect& resultingOpaqueRect, RenderingStats&) OVERRIDE;
void updateTexture(TextureUpdateQueue&, PrioritizedTexture*, const IntRect& sourceRect, const IntSize& destOffset, bool partialUpdate);
diff --git a/cc/bitmap_skpicture_canvas_layer_updater.cc b/cc/bitmap_skpicture_canvas_layer_updater.cc
index a8ae1ca..7b12e27 100644
--- a/cc/bitmap_skpicture_canvas_layer_updater.cc
+++ b/cc/bitmap_skpicture_canvas_layer_updater.cc
@@ -15,13 +15,13 @@
namespace cc {
-BitmapSkPictureCanvasLayerUpdater::Texture::Texture(BitmapSkPictureCanvasLayerUpdater* updater, scoped_ptr<PrioritizedTexture> texture)
- : CanvasLayerUpdater::Texture(texture.Pass())
+BitmapSkPictureCanvasLayerUpdater::Resource::Resource(BitmapSkPictureCanvasLayerUpdater* updater, scoped_ptr<PrioritizedTexture> texture)
+ : CanvasLayerUpdater::Resource(texture.Pass())
, m_updater(updater)
{
}
-void BitmapSkPictureCanvasLayerUpdater::Texture::update(TextureUpdateQueue& queue, const IntRect& sourceRect, const IntSize& destOffset, bool partialUpdate, RenderingStats& stats)
+void BitmapSkPictureCanvasLayerUpdater::Resource::update(TextureUpdateQueue& queue, const IntRect& sourceRect, const IntSize& destOffset, bool partialUpdate, RenderingStats& stats)
{
m_bitmap.setConfig(SkBitmap::kARGB_8888_Config, sourceRect.width(), sourceRect.height());
m_bitmap.allocPixels();
@@ -54,9 +54,9 @@ BitmapSkPictureCanvasLayerUpdater::~BitmapSkPictureCanvasLayerUpdater()
{
}
-scoped_ptr<LayerUpdater::Texture> BitmapSkPictureCanvasLayerUpdater::createTexture(PrioritizedTextureManager* manager)
+scoped_ptr<LayerUpdater::Resource> BitmapSkPictureCanvasLayerUpdater::createResource(PrioritizedTextureManager* manager)
{
- return scoped_ptr<LayerUpdater::Texture>(new Texture(this, PrioritizedTexture::create(manager)));
+ return scoped_ptr<LayerUpdater::Resource>(new Resource(this, PrioritizedTexture::create(manager)));
}
void BitmapSkPictureCanvasLayerUpdater::paintContentsRect(SkCanvas* canvas, const IntRect& sourceRect, RenderingStats& stats)
diff --git a/cc/bitmap_skpicture_canvas_layer_updater.h b/cc/bitmap_skpicture_canvas_layer_updater.h
index b9e30a5..a00f322 100644
--- a/cc/bitmap_skpicture_canvas_layer_updater.h
+++ b/cc/bitmap_skpicture_canvas_layer_updater.h
@@ -14,9 +14,9 @@ namespace cc {
// the SkPicture into bitmaps for each tile. This implements Settings::perTilePainting.
class BitmapSkPictureCanvasLayerUpdater : public SkPictureCanvasLayerUpdater {
public:
- class Texture : public CanvasLayerUpdater::Texture {
+ class Resource : public CanvasLayerUpdater::Resource {
public:
- Texture(BitmapSkPictureCanvasLayerUpdater*, scoped_ptr<PrioritizedTexture>);
+ Resource(BitmapSkPictureCanvasLayerUpdater*, scoped_ptr<PrioritizedTexture>);
virtual void update(TextureUpdateQueue&, const IntRect& sourceRect, const IntSize& destOffset, bool partialUpdate, RenderingStats&) OVERRIDE;
@@ -29,7 +29,7 @@ public:
static scoped_refptr<BitmapSkPictureCanvasLayerUpdater> create(scoped_ptr<LayerPainter>);
- virtual scoped_ptr<LayerUpdater::Texture> createTexture(PrioritizedTextureManager*) OVERRIDE;
+ virtual scoped_ptr<LayerUpdater::Resource> createResource(PrioritizedTextureManager*) OVERRIDE;
void paintContentsRect(SkCanvas*, const IntRect& sourceRect, RenderingStats&);
private:
diff --git a/cc/image_layer.cc b/cc/image_layer.cc
index 1e37920..d31c362 100644
--- a/cc/image_layer.cc
+++ b/cc/image_layer.cc
@@ -15,10 +15,10 @@ namespace cc {
class ImageLayerUpdater : public LayerUpdater {
public:
- class Texture : public LayerUpdater::Texture {
+ class Resource : public LayerUpdater::Resource {
public:
- Texture(ImageLayerUpdater* updater, scoped_ptr<PrioritizedTexture> texture)
- : LayerUpdater::Texture(texture.Pass())
+ Resource(ImageLayerUpdater* updater, scoped_ptr<PrioritizedTexture> texture)
+ : LayerUpdater::Resource(texture.Pass())
, m_updater(updater)
{
}
@@ -39,10 +39,10 @@ public:
return make_scoped_refptr(new ImageLayerUpdater());
}
- virtual scoped_ptr<LayerUpdater::Texture> createTexture(
+ virtual scoped_ptr<LayerUpdater::Resource> createResource(
PrioritizedTextureManager* manager) OVERRIDE
{
- return scoped_ptr<LayerUpdater::Texture>(new Texture(this, PrioritizedTexture::create(manager)));
+ return scoped_ptr<LayerUpdater::Resource>(new Resource(this, PrioritizedTexture::create(manager)));
}
void updateTexture(TextureUpdateQueue& queue, PrioritizedTexture* texture, const IntRect& sourceRect, const IntSize& destOffset, bool partialUpdate)
diff --git a/cc/layer_updater.cc b/cc/layer_updater.cc
index e0a4384..2b01d125 100644
--- a/cc/layer_updater.cc
+++ b/cc/layer_updater.cc
@@ -8,12 +8,12 @@
namespace cc {
-LayerUpdater::Texture::Texture(scoped_ptr<PrioritizedTexture> texture)
+LayerUpdater::Resource::Resource(scoped_ptr<PrioritizedTexture> texture)
: m_texture(texture.Pass())
{
}
-LayerUpdater::Texture::~Texture()
+LayerUpdater::Resource::~Resource()
{
}
diff --git a/cc/layer_updater.h b/cc/layer_updater.h
index 10bced3..b3905ab 100644
--- a/cc/layer_updater.h
+++ b/cc/layer_updater.h
@@ -19,10 +19,10 @@ class TextureUpdateQueue;
class LayerUpdater : public base::RefCounted<LayerUpdater> {
public:
- // Allows texture uploaders to store per-tile resources.
- class Texture {
+ // Allows updaters to store per-resource update properties.
+ class Resource {
public:
- virtual ~Texture();
+ virtual ~Resource();
PrioritizedTexture* texture() { return m_texture.get(); }
void swapTextureWith(scoped_ptr<PrioritizedTexture>& texture) { m_texture.swap(texture); }
@@ -30,7 +30,7 @@ public:
// instead of an argument passed to update().
virtual void update(TextureUpdateQueue&, const IntRect& sourceRect, const IntSize& destOffset, bool partialUpdate, RenderingStats&) = 0;
protected:
- explicit Texture(scoped_ptr<PrioritizedTexture> texture);
+ explicit Resource(scoped_ptr<PrioritizedTexture> texture);
private:
scoped_ptr<PrioritizedTexture> m_texture;
@@ -38,7 +38,7 @@ public:
LayerUpdater() { }
- virtual scoped_ptr<Texture> createTexture(PrioritizedTextureManager*) = 0;
+ virtual scoped_ptr<Resource> createResource(PrioritizedTextureManager*) = 0;
// The |resultingOpaqueRect| gives back a region of the layer that was painted opaque. If the layer is marked opaque in the updater,
// then this region should be ignored in preference for the entire layer's area.
virtual void prepareToUpdate(const IntRect& contentRect, const IntSize& tileSize, float contentsWidthScale, float contentsHeightScale, IntRect& resultingOpaqueRect, RenderingStats&) { }
diff --git a/cc/scrollbar_layer.cc b/cc/scrollbar_layer.cc
index 829ace9..9ed4778 100644
--- a/cc/scrollbar_layer.cc
+++ b/cc/scrollbar_layer.cc
@@ -193,23 +193,23 @@ void ScrollbarLayer::createUpdaterIfNeeded()
if (!m_backTrackUpdater)
m_backTrackUpdater = CachingBitmapCanvasLayerUpdater::Create(ScrollbarBackgroundPainter::create(m_scrollbar.get(), m_painter, m_geometry.get(), WebKit::WebScrollbar::BackTrackPart).PassAs<LayerPainter>());
if (!m_backTrack)
- m_backTrack = m_backTrackUpdater->createTexture(layerTreeHost()->contentsTextureManager());
+ m_backTrack = m_backTrackUpdater->createResource(layerTreeHost()->contentsTextureManager());
// Only create two-part track if we think the two parts could be different in appearance.
if (m_scrollbar->isCustomScrollbar()) {
if (!m_foreTrackUpdater)
m_foreTrackUpdater = CachingBitmapCanvasLayerUpdater::Create(ScrollbarBackgroundPainter::create(m_scrollbar.get(), m_painter, m_geometry.get(), WebKit::WebScrollbar::ForwardTrackPart).PassAs<LayerPainter>());
if (!m_foreTrack)
- m_foreTrack = m_foreTrackUpdater->createTexture(layerTreeHost()->contentsTextureManager());
+ m_foreTrack = m_foreTrackUpdater->createResource(layerTreeHost()->contentsTextureManager());
}
if (!m_thumbUpdater)
m_thumbUpdater = CachingBitmapCanvasLayerUpdater::Create(ScrollbarThumbPainter::create(m_scrollbar.get(), m_painter, m_geometry.get()).PassAs<LayerPainter>());
if (!m_thumb)
- m_thumb = m_thumbUpdater->createTexture(layerTreeHost()->contentsTextureManager());
+ m_thumb = m_thumbUpdater->createResource(layerTreeHost()->contentsTextureManager());
}
-void ScrollbarLayer::updatePart(CachingBitmapCanvasLayerUpdater* painter, LayerUpdater::Texture* texture, const IntRect& rect, TextureUpdateQueue& queue, RenderingStats& stats)
+void ScrollbarLayer::updatePart(CachingBitmapCanvasLayerUpdater* painter, LayerUpdater::Resource* texture, const IntRect& rect, TextureUpdateQueue& queue, RenderingStats& stats)
{
// Skip painting and uploading if there are no invalidations and
// we already have valid texture data.
diff --git a/cc/scrollbar_layer.h b/cc/scrollbar_layer.h
index 8be2d82..cfa2fc3 100644
--- a/cc/scrollbar_layer.h
+++ b/cc/scrollbar_layer.h
@@ -42,7 +42,7 @@ protected:
virtual ~ScrollbarLayer();
private:
- void updatePart(CachingBitmapCanvasLayerUpdater*, LayerUpdater::Texture*, const IntRect&, TextureUpdateQueue&, RenderingStats&);
+ void updatePart(CachingBitmapCanvasLayerUpdater*, LayerUpdater::Resource*, const IntRect&, TextureUpdateQueue&, RenderingStats&);
void createUpdaterIfNeeded();
scoped_ptr<WebKit::WebScrollbar> m_scrollbar;
@@ -57,9 +57,9 @@ private:
scoped_refptr<CachingBitmapCanvasLayerUpdater> m_thumbUpdater;
// All the parts of the scrollbar except the thumb
- scoped_ptr<LayerUpdater::Texture> m_backTrack;
- scoped_ptr<LayerUpdater::Texture> m_foreTrack;
- scoped_ptr<LayerUpdater::Texture> m_thumb;
+ scoped_ptr<LayerUpdater::Resource> m_backTrack;
+ scoped_ptr<LayerUpdater::Resource> m_foreTrack;
+ scoped_ptr<LayerUpdater::Resource> m_thumb;
};
}
diff --git a/cc/skpicture_canvas_layer_updater.cc b/cc/skpicture_canvas_layer_updater.cc
index fe42362..ddf6428 100644
--- a/cc/skpicture_canvas_layer_updater.cc
+++ b/cc/skpicture_canvas_layer_updater.cc
@@ -13,17 +13,17 @@
namespace cc {
-SkPictureCanvasLayerUpdater::Texture::Texture(SkPictureCanvasLayerUpdater* updater, scoped_ptr<PrioritizedTexture> texture)
- : LayerUpdater::Texture(texture.Pass())
+SkPictureCanvasLayerUpdater::Resource::Resource(SkPictureCanvasLayerUpdater* updater, scoped_ptr<PrioritizedTexture> texture)
+ : LayerUpdater::Resource(texture.Pass())
, m_updater(updater)
{
}
-SkPictureCanvasLayerUpdater::Texture::~Texture()
+SkPictureCanvasLayerUpdater::Resource::~Resource()
{
}
-void SkPictureCanvasLayerUpdater::Texture::update(TextureUpdateQueue& queue, const IntRect& sourceRect, const IntSize& destOffset, bool partialUpdate, RenderingStats&)
+void SkPictureCanvasLayerUpdater::Resource::update(TextureUpdateQueue& queue, const IntRect& sourceRect, const IntSize& destOffset, bool partialUpdate, RenderingStats&)
{
updater()->updateTexture(queue, texture(), sourceRect, destOffset, partialUpdate);
}
@@ -43,9 +43,9 @@ scoped_refptr<SkPictureCanvasLayerUpdater> SkPictureCanvasLayerUpdater::create(s
return make_scoped_refptr(new SkPictureCanvasLayerUpdater(painter.Pass()));
}
-scoped_ptr<LayerUpdater::Texture> SkPictureCanvasLayerUpdater::createTexture(PrioritizedTextureManager* manager)
+scoped_ptr<LayerUpdater::Resource> SkPictureCanvasLayerUpdater::createResource(PrioritizedTextureManager* manager)
{
- return scoped_ptr<LayerUpdater::Texture>(new Texture(this, PrioritizedTexture::create(manager)));
+ return scoped_ptr<LayerUpdater::Resource>(new Resource(this, PrioritizedTexture::create(manager)));
}
void SkPictureCanvasLayerUpdater::prepareToUpdate(const IntRect& contentRect, const IntSize&, float contentsWidthScale, float contentsHeightScale, IntRect& resultingOpaqueRect, RenderingStats& stats)
diff --git a/cc/skpicture_canvas_layer_updater.h b/cc/skpicture_canvas_layer_updater.h
index 5fe8e1a..2cac07c 100644
--- a/cc/skpicture_canvas_layer_updater.h
+++ b/cc/skpicture_canvas_layer_updater.h
@@ -22,10 +22,10 @@ class LayerPainter;
// implementations.
class SkPictureCanvasLayerUpdater : public CanvasLayerUpdater {
public:
- class Texture : public LayerUpdater::Texture {
+ class Resource : public LayerUpdater::Resource {
public:
- Texture(SkPictureCanvasLayerUpdater*, scoped_ptr<PrioritizedTexture>);
- virtual ~Texture();
+ Resource(SkPictureCanvasLayerUpdater*, scoped_ptr<PrioritizedTexture>);
+ virtual ~Resource();
virtual void update(TextureUpdateQueue&, const IntRect& sourceRect, const IntSize& destOffset, bool partialUpdate, RenderingStats&) OVERRIDE;
@@ -37,7 +37,7 @@ public:
static scoped_refptr<SkPictureCanvasLayerUpdater> create(scoped_ptr<LayerPainter>);
- virtual scoped_ptr<LayerUpdater::Texture> createTexture(PrioritizedTextureManager*) OVERRIDE;
+ virtual scoped_ptr<LayerUpdater::Resource> createResource(PrioritizedTextureManager*) OVERRIDE;
virtual void setOpaque(bool) OVERRIDE;
protected:
diff --git a/cc/test/tiled_layer_test_common.cc b/cc/test/tiled_layer_test_common.cc
index 3467e22..5f6a0a2 100644
--- a/cc/test/tiled_layer_test_common.cc
+++ b/cc/test/tiled_layer_test_common.cc
@@ -10,19 +10,19 @@ using namespace cc;
namespace WebKitTests {
-FakeLayerUpdater::Texture::Texture(FakeLayerUpdater* layer, scoped_ptr<PrioritizedTexture> texture)
- : LayerUpdater::Texture(texture.Pass())
+FakeLayerUpdater::Resource::Resource(FakeLayerUpdater* layer, scoped_ptr<PrioritizedTexture> texture)
+ : LayerUpdater::Resource(texture.Pass())
, m_layer(layer)
{
m_bitmap.setConfig(SkBitmap::kARGB_8888_Config, 10, 10);
m_bitmap.allocPixels();
}
-FakeLayerUpdater::Texture::~Texture()
+FakeLayerUpdater::Resource::~Resource()
{
}
-void FakeLayerUpdater::Texture::update(TextureUpdateQueue& queue, const IntRect&, const IntSize&, bool partialUpdate, RenderingStats&)
+void FakeLayerUpdater::Resource::update(TextureUpdateQueue& queue, const IntRect&, const IntSize&, bool partialUpdate, RenderingStats&)
{
const IntRect rect(0, 0, 10, 10);
ResourceUpdate upload = ResourceUpdate::Create(
@@ -63,9 +63,9 @@ void FakeLayerUpdater::setRectToInvalidate(const IntRect& rect, FakeTiledLayer*
m_layer = layer;
}
-scoped_ptr<LayerUpdater::Texture> FakeLayerUpdater::createTexture(PrioritizedTextureManager* manager)
+scoped_ptr<LayerUpdater::Resource> FakeLayerUpdater::createResource(PrioritizedTextureManager* manager)
{
- return scoped_ptr<LayerUpdater::Texture>(new Texture(this, PrioritizedTexture::create(manager)));
+ return scoped_ptr<LayerUpdater::Resource>(new Resource(this, PrioritizedTexture::create(manager)));
}
FakeTiledLayerImpl::FakeTiledLayerImpl(int id)
diff --git a/cc/test/tiled_layer_test_common.h b/cc/test/tiled_layer_test_common.h
index 6f27a67..bcb5909 100644
--- a/cc/test/tiled_layer_test_common.h
+++ b/cc/test/tiled_layer_test_common.h
@@ -23,10 +23,10 @@ class FakeTiledLayer;
class FakeLayerUpdater : public cc::LayerUpdater {
public:
- class Texture : public cc::LayerUpdater::Texture {
+ class Resource : public cc::LayerUpdater::Resource {
public:
- Texture(FakeLayerUpdater*, scoped_ptr<cc::PrioritizedTexture>);
- virtual ~Texture();
+ Resource(FakeLayerUpdater*, scoped_ptr<cc::PrioritizedTexture>);
+ virtual ~Resource();
virtual void update(cc::TextureUpdateQueue&, const cc::IntRect&, const cc::IntSize&, bool, cc::RenderingStats&) OVERRIDE;
@@ -37,7 +37,7 @@ public:
FakeLayerUpdater();
- virtual scoped_ptr<cc::LayerUpdater::Texture> createTexture(cc::PrioritizedTextureManager*) OVERRIDE;
+ virtual scoped_ptr<cc::LayerUpdater::Resource> createResource(cc::PrioritizedTextureManager*) OVERRIDE;
virtual void prepareToUpdate(const cc::IntRect& contentRect, const cc::IntSize&, float, float, cc::IntRect& resultingOpaqueRect, cc::RenderingStats&) OVERRIDE;
// Sets the rect to invalidate during the next call to prepareToUpdate(). After the next
diff --git a/cc/tiled_layer.cc b/cc/tiled_layer.cc
index e737b75..538b30c 100644
--- a/cc/tiled_layer.cc
+++ b/cc/tiled_layer.cc
@@ -31,13 +31,13 @@ static const int prepaintColumns = 2;
class UpdatableTile : public LayerTilingData::Tile {
public:
- static scoped_ptr<UpdatableTile> create(scoped_ptr<LayerUpdater::Texture> texture)
+ static scoped_ptr<UpdatableTile> create(scoped_ptr<LayerUpdater::Resource> updaterResource)
{
- return make_scoped_ptr(new UpdatableTile(texture.Pass()));
+ return make_scoped_ptr(new UpdatableTile(updaterResource.Pass()));
}
- LayerUpdater::Texture* texture() { return m_texture.get(); }
- PrioritizedTexture* managedTexture() { return m_texture->texture(); }
+ LayerUpdater::Resource* updaterResource() { return m_updaterResource.get(); }
+ PrioritizedTexture* managedTexture() { return m_updaterResource->texture(); }
bool isDirty() const { return !dirtyRect.isEmpty(); }
@@ -71,16 +71,16 @@ public:
bool isInUseOnImpl;
private:
- explicit UpdatableTile(scoped_ptr<LayerUpdater::Texture> texture)
+ explicit UpdatableTile(scoped_ptr<LayerUpdater::Resource> updaterResource)
: partialUpdate(false)
, validForFrame(false)
, occluded(false)
, isInUseOnImpl(false)
- , m_texture(texture.Pass())
+ , m_updaterResource(updaterResource.Pass())
{
}
- scoped_ptr<LayerUpdater::Texture> m_texture;
+ scoped_ptr<LayerUpdater::Resource> m_updaterResource;
DISALLOW_COPY_AND_ASSIGN(UpdatableTile);
};
@@ -267,7 +267,7 @@ UpdatableTile* TiledLayer::createTile(int i, int j)
{
createUpdaterIfNeeded();
- scoped_ptr<UpdatableTile> tile(UpdatableTile::create(updater()->createTexture(textureManager())));
+ scoped_ptr<UpdatableTile> tile(UpdatableTile::create(updater()->createResource(textureManager())));
tile->managedTexture()->setDimensions(m_tiler->tileSize(), m_textureFormat);
UpdatableTile* addedTile = tile.get();
@@ -531,7 +531,7 @@ void TiledLayer::updateTileTextures(const IntRect& paintRect, int left, int top,
if (paintOffset.y() + sourceRect.height() > paintRect.height())
CRASH();
- tile->texture()->update(queue, sourceRect, destOffset, tile->partialUpdate, stats);
+ tile->updaterResource()->update(queue, sourceRect, destOffset, tile->partialUpdate, stats);
if (occlusion)
occlusion->overdrawMetrics().didUpload(WebTransformationMatrix(), sourceRect, tile->opaqueRect());
@@ -627,7 +627,7 @@ void TiledLayer::setTexturePriorities(const PriorityCalculator& priorityCalc)
IntRect tileRect = m_tiler->tileRect(tile);
tile->dirtyRect = tileRect;
- LayerUpdater::Texture* backBuffer = tile->texture();
+ LayerUpdater::Resource* backBuffer = tile->updaterResource();
setPriorityForTexture(visibleContentRect(), tile->dirtyRect, drawsToRoot, smallAnimatedLayer, backBuffer->texture());
scoped_ptr<PrioritizedTexture> frontBuffer = PrioritizedTexture::create(backBuffer->texture()->textureManager(),
backBuffer->texture()->size(),