Index: cc/resources/picture_pile_impl_unittest.cc |
diff --git a/cc/resources/picture_pile_impl_unittest.cc b/cc/resources/picture_pile_impl_unittest.cc |
index e5691e39301dff996497cd8a7cef836491014068..5f144ad17d5bf497859e63b92523b93aac0121bb 100644 |
--- a/cc/resources/picture_pile_impl_unittest.cc |
+++ b/cc/resources/picture_pile_impl_unittest.cc |
@@ -6,7 +6,6 @@ |
#include "cc/test/fake_picture_pile_impl.h" |
#include "cc/test/fake_rendering_stats_instrumentation.h" |
#include "cc/test/skia_common.h" |
-#include "skia/ext/lazy_pixel_ref.h" |
#include "skia/ext/refptr.h" |
#include "testing/gtest/include/gtest/gtest.h" |
#include "third_party/skia/include/core/SkPixelRef.h" |
@@ -206,7 +205,7 @@ TEST(PicturePileImplTest, PixelRefIteratorEmpty) { |
} |
} |
-TEST(PicturePileImplTest, PixelRefIteratorNoLazyRefs) { |
+TEST(PicturePileImplTest, PixelRefIteratorNoDiscardableRefs) { |
gfx::Size tile_size(128, 128); |
gfx::Size layer_bounds(256, 256); |
@@ -216,16 +215,16 @@ TEST(PicturePileImplTest, PixelRefIteratorNoLazyRefs) { |
SkPaint simple_paint; |
simple_paint.setColor(SkColorSetARGB(255, 12, 23, 34)); |
- SkBitmap non_lazy_bitmap; |
- CreateBitmap(gfx::Size(128, 128), "notlazy", &non_lazy_bitmap); |
+ SkBitmap non_discardable_bitmap; |
+ CreateBitmap(gfx::Size(128, 128), "notdiscardable", &non_discardable_bitmap); |
pile->add_draw_rect_with_paint(gfx::Rect(0, 0, 256, 256), simple_paint); |
pile->add_draw_rect_with_paint(gfx::Rect(128, 128, 512, 512), simple_paint); |
pile->add_draw_rect_with_paint(gfx::Rect(512, 0, 256, 256), simple_paint); |
pile->add_draw_rect_with_paint(gfx::Rect(0, 512, 256, 256), simple_paint); |
- pile->add_draw_bitmap(non_lazy_bitmap, gfx::Point(128, 0)); |
- pile->add_draw_bitmap(non_lazy_bitmap, gfx::Point(0, 128)); |
- pile->add_draw_bitmap(non_lazy_bitmap, gfx::Point(150, 150)); |
+ pile->add_draw_bitmap(non_discardable_bitmap, gfx::Point(128, 0)); |
+ pile->add_draw_bitmap(non_discardable_bitmap, gfx::Point(0, 128)); |
+ pile->add_draw_bitmap(non_discardable_bitmap, gfx::Point(150, 150)); |
pile->RerecordPile(); |
@@ -279,27 +278,27 @@ TEST(PicturePileImplTest, PixelRefIteratorNoLazyRefs) { |
} |
} |
-TEST(PicturePileImplTest, PixelRefIteratorLazyRefs) { |
+TEST(PicturePileImplTest, PixelRefIteratorDiscardableRefs) { |
gfx::Size tile_size(128, 128); |
gfx::Size layer_bounds(256, 256); |
scoped_refptr<FakePicturePileImpl> pile = |
FakePicturePileImpl::CreateFilledPile(tile_size, layer_bounds); |
- SkBitmap lazy_bitmap[2][2]; |
- CreateBitmap(gfx::Size(32, 32), "lazy", &lazy_bitmap[0][0]); |
- CreateBitmap(gfx::Size(32, 32), "lazy", &lazy_bitmap[1][0]); |
- CreateBitmap(gfx::Size(32, 32), "lazy", &lazy_bitmap[1][1]); |
+ SkBitmap discardable_bitmap[2][2]; |
+ CreateBitmap(gfx::Size(32, 32), "discardable", &discardable_bitmap[0][0]); |
+ CreateBitmap(gfx::Size(32, 32), "discardable", &discardable_bitmap[1][0]); |
+ CreateBitmap(gfx::Size(32, 32), "discardable", &discardable_bitmap[1][1]); |
- // Lazy pixel refs are found in the following cells: |
+ // Discardable pixel refs are found in the following cells: |
// |---|---| |
// | x | | |
// |---|---| |
// | x | x | |
// |---|---| |
- pile->add_draw_bitmap(lazy_bitmap[0][0], gfx::Point(0, 0)); |
- pile->add_draw_bitmap(lazy_bitmap[1][0], gfx::Point(0, 130)); |
- pile->add_draw_bitmap(lazy_bitmap[1][1], gfx::Point(140, 140)); |
+ pile->add_draw_bitmap(discardable_bitmap[0][0], gfx::Point(0, 0)); |
+ pile->add_draw_bitmap(discardable_bitmap[1][0], gfx::Point(0, 130)); |
+ pile->add_draw_bitmap(discardable_bitmap[1][1], gfx::Point(140, 140)); |
pile->RerecordPile(); |
@@ -308,21 +307,21 @@ TEST(PicturePileImplTest, PixelRefIteratorLazyRefs) { |
PicturePileImpl::PixelRefIterator iterator( |
gfx::Rect(0, 0, 128, 128), 1.0, pile.get()); |
EXPECT_TRUE(iterator); |
- EXPECT_TRUE(*iterator == lazy_bitmap[0][0].pixelRef()); |
+ EXPECT_TRUE(*iterator == discardable_bitmap[0][0].pixelRef()); |
EXPECT_FALSE(++iterator); |
} |
{ |
PicturePileImpl::PixelRefIterator iterator( |
gfx::Rect(0, 0, 256, 256), 2.0, pile.get()); |
EXPECT_TRUE(iterator); |
- EXPECT_TRUE(*iterator == lazy_bitmap[0][0].pixelRef()); |
+ EXPECT_TRUE(*iterator == discardable_bitmap[0][0].pixelRef()); |
EXPECT_FALSE(++iterator); |
} |
{ |
PicturePileImpl::PixelRefIterator iterator( |
gfx::Rect(0, 0, 64, 64), 0.5, pile.get()); |
EXPECT_TRUE(iterator); |
- EXPECT_TRUE(*iterator == lazy_bitmap[0][0].pixelRef()); |
+ EXPECT_TRUE(*iterator == discardable_bitmap[0][0].pixelRef()); |
EXPECT_FALSE(++iterator); |
} |
// Shifted tile sized iterators. These should find only one pixel ref. |
@@ -330,24 +329,24 @@ TEST(PicturePileImplTest, PixelRefIteratorLazyRefs) { |
PicturePileImpl::PixelRefIterator iterator( |
gfx::Rect(140, 140, 128, 128), 1.0, pile.get()); |
EXPECT_TRUE(iterator); |
- EXPECT_TRUE(*iterator == lazy_bitmap[1][1].pixelRef()); |
+ EXPECT_TRUE(*iterator == discardable_bitmap[1][1].pixelRef()); |
EXPECT_FALSE(++iterator); |
} |
{ |
PicturePileImpl::PixelRefIterator iterator( |
gfx::Rect(280, 280, 256, 256), 2.0, pile.get()); |
EXPECT_TRUE(iterator); |
- EXPECT_TRUE(*iterator == lazy_bitmap[1][1].pixelRef()); |
+ EXPECT_TRUE(*iterator == discardable_bitmap[1][1].pixelRef()); |
EXPECT_FALSE(++iterator); |
} |
{ |
PicturePileImpl::PixelRefIterator iterator( |
gfx::Rect(70, 70, 64, 64), 0.5, pile.get()); |
EXPECT_TRUE(iterator); |
- EXPECT_TRUE(*iterator == lazy_bitmap[1][1].pixelRef()); |
+ EXPECT_TRUE(*iterator == discardable_bitmap[1][1].pixelRef()); |
EXPECT_FALSE(++iterator); |
} |
- // Ensure there's no lazy pixel refs in the empty cell |
+ // Ensure there's no discardable pixel refs in the empty cell |
{ |
PicturePileImpl::PixelRefIterator iterator( |
gfx::Rect(140, 0, 128, 128), 1.0, pile.get()); |
@@ -358,58 +357,58 @@ TEST(PicturePileImplTest, PixelRefIteratorLazyRefs) { |
PicturePileImpl::PixelRefIterator iterator( |
gfx::Rect(0, 0, 256, 256), 1.0, pile.get()); |
EXPECT_TRUE(iterator); |
- EXPECT_TRUE(*iterator == lazy_bitmap[0][0].pixelRef()); |
+ EXPECT_TRUE(*iterator == discardable_bitmap[0][0].pixelRef()); |
EXPECT_TRUE(++iterator); |
- EXPECT_TRUE(*iterator == lazy_bitmap[1][0].pixelRef()); |
+ EXPECT_TRUE(*iterator == discardable_bitmap[1][0].pixelRef()); |
EXPECT_TRUE(++iterator); |
- EXPECT_TRUE(*iterator == lazy_bitmap[1][1].pixelRef()); |
+ EXPECT_TRUE(*iterator == discardable_bitmap[1][1].pixelRef()); |
EXPECT_FALSE(++iterator); |
} |
{ |
PicturePileImpl::PixelRefIterator iterator( |
gfx::Rect(0, 0, 512, 512), 2.0, pile.get()); |
EXPECT_TRUE(iterator); |
- EXPECT_TRUE(*iterator == lazy_bitmap[0][0].pixelRef()); |
+ EXPECT_TRUE(*iterator == discardable_bitmap[0][0].pixelRef()); |
EXPECT_TRUE(++iterator); |
- EXPECT_TRUE(*iterator == lazy_bitmap[1][0].pixelRef()); |
+ EXPECT_TRUE(*iterator == discardable_bitmap[1][0].pixelRef()); |
EXPECT_TRUE(++iterator); |
- EXPECT_TRUE(*iterator == lazy_bitmap[1][1].pixelRef()); |
+ EXPECT_TRUE(*iterator == discardable_bitmap[1][1].pixelRef()); |
EXPECT_FALSE(++iterator); |
} |
{ |
PicturePileImpl::PixelRefIterator iterator( |
gfx::Rect(0, 0, 128, 128), 0.5, pile.get()); |
EXPECT_TRUE(iterator); |
- EXPECT_TRUE(*iterator == lazy_bitmap[0][0].pixelRef()); |
+ EXPECT_TRUE(*iterator == discardable_bitmap[0][0].pixelRef()); |
EXPECT_TRUE(++iterator); |
- EXPECT_TRUE(*iterator == lazy_bitmap[1][0].pixelRef()); |
+ EXPECT_TRUE(*iterator == discardable_bitmap[1][0].pixelRef()); |
EXPECT_TRUE(++iterator); |
- EXPECT_TRUE(*iterator == lazy_bitmap[1][1].pixelRef()); |
+ EXPECT_TRUE(*iterator == discardable_bitmap[1][1].pixelRef()); |
EXPECT_FALSE(++iterator); |
} |
} |
-TEST(PicturePileImplTest, PixelRefIteratorLazyRefsOneTile) { |
+TEST(PicturePileImplTest, PixelRefIteratorDiscardableRefsOneTile) { |
gfx::Size tile_size(256, 256); |
gfx::Size layer_bounds(512, 512); |
scoped_refptr<FakePicturePileImpl> pile = |
FakePicturePileImpl::CreateFilledPile(tile_size, layer_bounds); |
- SkBitmap lazy_bitmap[2][2]; |
- CreateBitmap(gfx::Size(32, 32), "lazy", &lazy_bitmap[0][0]); |
- CreateBitmap(gfx::Size(32, 32), "lazy", &lazy_bitmap[0][1]); |
- CreateBitmap(gfx::Size(32, 32), "lazy", &lazy_bitmap[1][1]); |
+ SkBitmap discardable_bitmap[2][2]; |
+ CreateBitmap(gfx::Size(32, 32), "discardable", &discardable_bitmap[0][0]); |
+ CreateBitmap(gfx::Size(32, 32), "discardable", &discardable_bitmap[0][1]); |
+ CreateBitmap(gfx::Size(32, 32), "discardable", &discardable_bitmap[1][1]); |
- // Lazy pixel refs are found in the following cells: |
+ // Discardable pixel refs are found in the following cells: |
// |---|---| |
// | x | x | |
// |---|---| |
// | | x | |
// |---|---| |
- pile->add_draw_bitmap(lazy_bitmap[0][0], gfx::Point(0, 0)); |
- pile->add_draw_bitmap(lazy_bitmap[0][1], gfx::Point(260, 0)); |
- pile->add_draw_bitmap(lazy_bitmap[1][1], gfx::Point(260, 260)); |
+ pile->add_draw_bitmap(discardable_bitmap[0][0], gfx::Point(0, 0)); |
+ pile->add_draw_bitmap(discardable_bitmap[0][1], gfx::Point(260, 0)); |
+ pile->add_draw_bitmap(discardable_bitmap[1][1], gfx::Point(260, 260)); |
pile->RerecordPile(); |
@@ -418,21 +417,21 @@ TEST(PicturePileImplTest, PixelRefIteratorLazyRefsOneTile) { |
PicturePileImpl::PixelRefIterator iterator( |
gfx::Rect(0, 0, 256, 256), 1.0, pile.get()); |
EXPECT_TRUE(iterator); |
- EXPECT_TRUE(*iterator == lazy_bitmap[0][0].pixelRef()); |
+ EXPECT_TRUE(*iterator == discardable_bitmap[0][0].pixelRef()); |
EXPECT_FALSE(++iterator); |
} |
{ |
PicturePileImpl::PixelRefIterator iterator( |
gfx::Rect(0, 0, 512, 512), 2.0, pile.get()); |
EXPECT_TRUE(iterator); |
- EXPECT_TRUE(*iterator == lazy_bitmap[0][0].pixelRef()); |
+ EXPECT_TRUE(*iterator == discardable_bitmap[0][0].pixelRef()); |
EXPECT_FALSE(++iterator); |
} |
{ |
PicturePileImpl::PixelRefIterator iterator( |
gfx::Rect(0, 0, 128, 128), 0.5, pile.get()); |
EXPECT_TRUE(iterator); |
- EXPECT_TRUE(*iterator == lazy_bitmap[0][0].pixelRef()); |
+ EXPECT_TRUE(*iterator == discardable_bitmap[0][0].pixelRef()); |
EXPECT_FALSE(++iterator); |
} |
// Shifted tile sized iterators. These should find only one pixel ref. |
@@ -440,24 +439,24 @@ TEST(PicturePileImplTest, PixelRefIteratorLazyRefsOneTile) { |
PicturePileImpl::PixelRefIterator iterator( |
gfx::Rect(260, 260, 256, 256), 1.0, pile.get()); |
EXPECT_TRUE(iterator); |
- EXPECT_TRUE(*iterator == lazy_bitmap[1][1].pixelRef()); |
+ EXPECT_TRUE(*iterator == discardable_bitmap[1][1].pixelRef()); |
EXPECT_FALSE(++iterator); |
} |
{ |
PicturePileImpl::PixelRefIterator iterator( |
gfx::Rect(520, 520, 512, 512), 2.0, pile.get()); |
EXPECT_TRUE(iterator); |
- EXPECT_TRUE(*iterator == lazy_bitmap[1][1].pixelRef()); |
+ EXPECT_TRUE(*iterator == discardable_bitmap[1][1].pixelRef()); |
EXPECT_FALSE(++iterator); |
} |
{ |
PicturePileImpl::PixelRefIterator iterator( |
gfx::Rect(130, 130, 128, 128), 0.5, pile.get()); |
EXPECT_TRUE(iterator); |
- EXPECT_TRUE(*iterator == lazy_bitmap[1][1].pixelRef()); |
+ EXPECT_TRUE(*iterator == discardable_bitmap[1][1].pixelRef()); |
EXPECT_FALSE(++iterator); |
} |
- // Ensure there's no lazy pixel refs in the empty cell |
+ // Ensure there's no discardable pixel refs in the empty cell |
{ |
PicturePileImpl::PixelRefIterator iterator( |
gfx::Rect(0, 256, 256, 256), 1.0, pile.get()); |
@@ -468,33 +467,33 @@ TEST(PicturePileImplTest, PixelRefIteratorLazyRefsOneTile) { |
PicturePileImpl::PixelRefIterator iterator( |
gfx::Rect(0, 0, 512, 512), 1.0, pile.get()); |
EXPECT_TRUE(iterator); |
- EXPECT_TRUE(*iterator == lazy_bitmap[0][0].pixelRef()); |
+ EXPECT_TRUE(*iterator == discardable_bitmap[0][0].pixelRef()); |
EXPECT_TRUE(++iterator); |
- EXPECT_TRUE(*iterator == lazy_bitmap[0][1].pixelRef()); |
+ EXPECT_TRUE(*iterator == discardable_bitmap[0][1].pixelRef()); |
EXPECT_TRUE(++iterator); |
- EXPECT_TRUE(*iterator == lazy_bitmap[1][1].pixelRef()); |
+ EXPECT_TRUE(*iterator == discardable_bitmap[1][1].pixelRef()); |
EXPECT_FALSE(++iterator); |
} |
{ |
PicturePileImpl::PixelRefIterator iterator( |
gfx::Rect(0, 0, 1024, 1024), 2.0, pile.get()); |
EXPECT_TRUE(iterator); |
- EXPECT_TRUE(*iterator == lazy_bitmap[0][0].pixelRef()); |
+ EXPECT_TRUE(*iterator == discardable_bitmap[0][0].pixelRef()); |
EXPECT_TRUE(++iterator); |
- EXPECT_TRUE(*iterator == lazy_bitmap[0][1].pixelRef()); |
+ EXPECT_TRUE(*iterator == discardable_bitmap[0][1].pixelRef()); |
EXPECT_TRUE(++iterator); |
- EXPECT_TRUE(*iterator == lazy_bitmap[1][1].pixelRef()); |
+ EXPECT_TRUE(*iterator == discardable_bitmap[1][1].pixelRef()); |
EXPECT_FALSE(++iterator); |
} |
{ |
PicturePileImpl::PixelRefIterator iterator( |
gfx::Rect(0, 0, 256, 256), 0.5, pile.get()); |
EXPECT_TRUE(iterator); |
- EXPECT_TRUE(*iterator == lazy_bitmap[0][0].pixelRef()); |
+ EXPECT_TRUE(*iterator == discardable_bitmap[0][0].pixelRef()); |
EXPECT_TRUE(++iterator); |
- EXPECT_TRUE(*iterator == lazy_bitmap[0][1].pixelRef()); |
+ EXPECT_TRUE(*iterator == discardable_bitmap[0][1].pixelRef()); |
EXPECT_TRUE(++iterator); |
- EXPECT_TRUE(*iterator == lazy_bitmap[1][1].pixelRef()); |
+ EXPECT_TRUE(*iterator == discardable_bitmap[1][1].pixelRef()); |
EXPECT_FALSE(++iterator); |
} |
@@ -502,50 +501,50 @@ TEST(PicturePileImplTest, PixelRefIteratorLazyRefsOneTile) { |
PicturePileImpl::PixelRefIterator iterator( |
gfx::Rect(0, 0, 512, 512), 1.0, pile.get()); |
EXPECT_TRUE(iterator); |
- EXPECT_TRUE(*iterator == lazy_bitmap[0][0].pixelRef()); |
+ EXPECT_TRUE(*iterator == discardable_bitmap[0][0].pixelRef()); |
EXPECT_TRUE(++iterator); |
- EXPECT_TRUE(*iterator == lazy_bitmap[0][1].pixelRef()); |
+ EXPECT_TRUE(*iterator == discardable_bitmap[0][1].pixelRef()); |
// copy now points to the same spot as iterator, |
// but both can be incremented independently. |
PicturePileImpl::PixelRefIterator copy = iterator; |
EXPECT_TRUE(++iterator); |
- EXPECT_TRUE(*iterator == lazy_bitmap[1][1].pixelRef()); |
+ EXPECT_TRUE(*iterator == discardable_bitmap[1][1].pixelRef()); |
EXPECT_FALSE(++iterator); |
EXPECT_TRUE(copy); |
- EXPECT_TRUE(*copy == lazy_bitmap[0][1].pixelRef()); |
+ EXPECT_TRUE(*copy == discardable_bitmap[0][1].pixelRef()); |
EXPECT_TRUE(++copy); |
- EXPECT_TRUE(*copy == lazy_bitmap[1][1].pixelRef()); |
+ EXPECT_TRUE(*copy == discardable_bitmap[1][1].pixelRef()); |
EXPECT_FALSE(++copy); |
} |
-TEST(PicturePileImplTest, PixelRefIteratorLazyRefsBaseNonLazy) { |
+TEST(PicturePileImplTest, PixelRefIteratorDiscardableRefsBaseNonDiscardable) { |
gfx::Size tile_size(256, 256); |
gfx::Size layer_bounds(512, 512); |
scoped_refptr<FakePicturePileImpl> pile = |
FakePicturePileImpl::CreateFilledPile(tile_size, layer_bounds); |
- SkBitmap non_lazy_bitmap; |
- CreateBitmap(gfx::Size(512, 512), "notlazy", &non_lazy_bitmap); |
+ SkBitmap non_discardable_bitmap; |
+ CreateBitmap(gfx::Size(512, 512), "notdiscardable", &non_discardable_bitmap); |
- SkBitmap lazy_bitmap[2][2]; |
- CreateBitmap(gfx::Size(128, 128), "lazy", &lazy_bitmap[0][0]); |
- CreateBitmap(gfx::Size(128, 128), "lazy", &lazy_bitmap[0][1]); |
- CreateBitmap(gfx::Size(128, 128), "lazy", &lazy_bitmap[1][1]); |
+ SkBitmap discardable_bitmap[2][2]; |
+ CreateBitmap(gfx::Size(128, 128), "discardable", &discardable_bitmap[0][0]); |
+ CreateBitmap(gfx::Size(128, 128), "discardable", &discardable_bitmap[0][1]); |
+ CreateBitmap(gfx::Size(128, 128), "discardable", &discardable_bitmap[1][1]); |
- // One large non-lazy bitmap covers the whole grid. |
- // Lazy pixel refs are found in the following cells: |
+ // One large non-discardable bitmap covers the whole grid. |
+ // Discardable pixel refs are found in the following cells: |
// |---|---| |
// | x | x | |
// |---|---| |
// | | x | |
// |---|---| |
- pile->add_draw_bitmap(non_lazy_bitmap, gfx::Point(0, 0)); |
- pile->add_draw_bitmap(lazy_bitmap[0][0], gfx::Point(0, 0)); |
- pile->add_draw_bitmap(lazy_bitmap[0][1], gfx::Point(260, 0)); |
- pile->add_draw_bitmap(lazy_bitmap[1][1], gfx::Point(260, 260)); |
+ pile->add_draw_bitmap(non_discardable_bitmap, gfx::Point(0, 0)); |
+ pile->add_draw_bitmap(discardable_bitmap[0][0], gfx::Point(0, 0)); |
+ pile->add_draw_bitmap(discardable_bitmap[0][1], gfx::Point(260, 0)); |
+ pile->add_draw_bitmap(discardable_bitmap[1][1], gfx::Point(260, 260)); |
pile->RerecordPile(); |
@@ -554,21 +553,21 @@ TEST(PicturePileImplTest, PixelRefIteratorLazyRefsBaseNonLazy) { |
PicturePileImpl::PixelRefIterator iterator( |
gfx::Rect(0, 0, 256, 256), 1.0, pile.get()); |
EXPECT_TRUE(iterator); |
- EXPECT_TRUE(*iterator == lazy_bitmap[0][0].pixelRef()); |
+ EXPECT_TRUE(*iterator == discardable_bitmap[0][0].pixelRef()); |
EXPECT_FALSE(++iterator); |
} |
{ |
PicturePileImpl::PixelRefIterator iterator( |
gfx::Rect(0, 0, 512, 512), 2.0, pile.get()); |
EXPECT_TRUE(iterator); |
- EXPECT_TRUE(*iterator == lazy_bitmap[0][0].pixelRef()); |
+ EXPECT_TRUE(*iterator == discardable_bitmap[0][0].pixelRef()); |
EXPECT_FALSE(++iterator); |
} |
{ |
PicturePileImpl::PixelRefIterator iterator( |
gfx::Rect(0, 0, 128, 128), 0.5, pile.get()); |
EXPECT_TRUE(iterator); |
- EXPECT_TRUE(*iterator == lazy_bitmap[0][0].pixelRef()); |
+ EXPECT_TRUE(*iterator == discardable_bitmap[0][0].pixelRef()); |
EXPECT_FALSE(++iterator); |
} |
// Shifted tile sized iterators. These should find only one pixel ref. |
@@ -576,24 +575,24 @@ TEST(PicturePileImplTest, PixelRefIteratorLazyRefsBaseNonLazy) { |
PicturePileImpl::PixelRefIterator iterator( |
gfx::Rect(260, 260, 256, 256), 1.0, pile.get()); |
EXPECT_TRUE(iterator); |
- EXPECT_TRUE(*iterator == lazy_bitmap[1][1].pixelRef()); |
+ EXPECT_TRUE(*iterator == discardable_bitmap[1][1].pixelRef()); |
EXPECT_FALSE(++iterator); |
} |
{ |
PicturePileImpl::PixelRefIterator iterator( |
gfx::Rect(520, 520, 512, 512), 2.0, pile.get()); |
EXPECT_TRUE(iterator); |
- EXPECT_TRUE(*iterator == lazy_bitmap[1][1].pixelRef()); |
+ EXPECT_TRUE(*iterator == discardable_bitmap[1][1].pixelRef()); |
EXPECT_FALSE(++iterator); |
} |
{ |
PicturePileImpl::PixelRefIterator iterator( |
gfx::Rect(130, 130, 128, 128), 0.5, pile.get()); |
EXPECT_TRUE(iterator); |
- EXPECT_TRUE(*iterator == lazy_bitmap[1][1].pixelRef()); |
+ EXPECT_TRUE(*iterator == discardable_bitmap[1][1].pixelRef()); |
EXPECT_FALSE(++iterator); |
} |
- // Ensure there's no lazy pixel refs in the empty cell |
+ // Ensure there's no discardable pixel refs in the empty cell |
{ |
PicturePileImpl::PixelRefIterator iterator( |
gfx::Rect(0, 256, 256, 256), 1.0, pile.get()); |
@@ -604,33 +603,33 @@ TEST(PicturePileImplTest, PixelRefIteratorLazyRefsBaseNonLazy) { |
PicturePileImpl::PixelRefIterator iterator( |
gfx::Rect(0, 0, 512, 512), 1.0, pile.get()); |
EXPECT_TRUE(iterator); |
- EXPECT_TRUE(*iterator == lazy_bitmap[0][0].pixelRef()); |
+ EXPECT_TRUE(*iterator == discardable_bitmap[0][0].pixelRef()); |
EXPECT_TRUE(++iterator); |
- EXPECT_TRUE(*iterator == lazy_bitmap[0][1].pixelRef()); |
+ EXPECT_TRUE(*iterator == discardable_bitmap[0][1].pixelRef()); |
EXPECT_TRUE(++iterator); |
- EXPECT_TRUE(*iterator == lazy_bitmap[1][1].pixelRef()); |
+ EXPECT_TRUE(*iterator == discardable_bitmap[1][1].pixelRef()); |
EXPECT_FALSE(++iterator); |
} |
{ |
PicturePileImpl::PixelRefIterator iterator( |
gfx::Rect(0, 0, 1024, 1024), 2.0, pile.get()); |
EXPECT_TRUE(iterator); |
- EXPECT_TRUE(*iterator == lazy_bitmap[0][0].pixelRef()); |
+ EXPECT_TRUE(*iterator == discardable_bitmap[0][0].pixelRef()); |
EXPECT_TRUE(++iterator); |
- EXPECT_TRUE(*iterator == lazy_bitmap[0][1].pixelRef()); |
+ EXPECT_TRUE(*iterator == discardable_bitmap[0][1].pixelRef()); |
EXPECT_TRUE(++iterator); |
- EXPECT_TRUE(*iterator == lazy_bitmap[1][1].pixelRef()); |
+ EXPECT_TRUE(*iterator == discardable_bitmap[1][1].pixelRef()); |
EXPECT_FALSE(++iterator); |
} |
{ |
PicturePileImpl::PixelRefIterator iterator( |
gfx::Rect(0, 0, 256, 256), 0.5, pile.get()); |
EXPECT_TRUE(iterator); |
- EXPECT_TRUE(*iterator == lazy_bitmap[0][0].pixelRef()); |
+ EXPECT_TRUE(*iterator == discardable_bitmap[0][0].pixelRef()); |
EXPECT_TRUE(++iterator); |
- EXPECT_TRUE(*iterator == lazy_bitmap[0][1].pixelRef()); |
+ EXPECT_TRUE(*iterator == discardable_bitmap[0][1].pixelRef()); |
EXPECT_TRUE(++iterator); |
- EXPECT_TRUE(*iterator == lazy_bitmap[1][1].pixelRef()); |
+ EXPECT_TRUE(*iterator == discardable_bitmap[1][1].pixelRef()); |
EXPECT_FALSE(++iterator); |
} |
} |