Lines Matching refs:layer

117   void LayerPushPropertiesTo(FakeTiledLayer* layer,
121 layer->PushPropertiesTo(layer_impl);
122 layer->ResetNumDependentsNeedPushProperties();
125 void LayerUpdate(FakeTiledLayer* layer, TestOcclusionTracker* occluded) {
127 layer->Update(queue_.get(), occluded);
209 scoped_refptr<FakeTiledLayer> layer =
215 layer_tree_host_->root_layer()->AddChild(layer);
218 layer->SetBounds(gfx::Size(100, 200));
220 UpdateAndPush(layer, layer_impl);
227 layer->InvalidateContentRect(gfx::Rect(0, 0, 100, 200));
228 layer->draw_properties().visible_content_rect = gfx::Rect(0, 0, 100, 100);
229 UpdateAndPush(layer, layer_impl);
238 scoped_refptr<FakeTiledLayer> layer =
246 layer_tree_host_->root_layer()->AddChild(layer);
252 layer->SetBounds(gfx::Size(100, 200));
254 UpdateAndPush(layer, layer_impl);
270 layer->InvalidateContentRect(gfx::Rect(0, 0, 50, 50));
274 UpdateAndPush(layer, layer_impl);
290 scoped_refptr<FakeTiledLayer> layer =
296 layer_tree_host_->root_layer()->AddChild(layer);
299 layer->SetBounds(gfx::Size(100, 200));
301 UpdateAndPush(layer, layer_impl);
313 LayerPushPropertiesTo(layer.get(), layer_impl.get());
320 layer->draw_properties().visible_content_rect = gfx::Rect(0, 0, 100, 100);
321 UpdateAndPush(layer, layer_impl);
329 scoped_refptr<FakeTiledLayer> layer =
335 layer_tree_host_->root_layer()->AddChild(layer);
339 layer->SetBounds(gfx::Size(500, 500));
341 layer->draw_properties().visible_content_rect = gfx::Rect(200, 200, 100, 100);
342 bool needs_update = UpdateAndPush(layer, layer_impl);
351 needs_update = UpdateAndPush(layer, layer_impl);
357 needs_update = UpdateAndPush(layer, layer_impl);
369 scoped_refptr<FakeTiledLayer> layer =
374 layer_tree_host_->root_layer()->AddChild(layer);
405 layer->SetBounds(bounds);
409 layer->draw_properties().visible_content_rect = previous_visible_rect;
410 bool needs_update = UpdateAndPush(layer, layer_impl);
414 layer->SetNeedsDisplay();
415 layer->draw_properties().visible_content_rect = visible_rect;
416 needs_update = UpdateAndPush(layer, layer_impl);
428 layer->draw_properties().visible_content_rect = next_visible_rect;
429 needs_update = UpdateAndPush(layer, layer_impl);
439 needs_update = UpdateAndPush(layer, layer_impl);
468 // for 2 tiles only in the other layer.
493 // Sanity check, we should have textures for the big layer.
509 scoped_refptr<FakeTiledLayer> layer =
517 layer_tree_host_->root_layer()->AddChild(layer);
523 layer->SetBounds(gfx::Size(100, 100));
525 layer->draw_properties().visible_content_rect = gfx::Rect(0, 0, 100, 100);
526 UpdateAndPush(layer, layer_impl);
535 scoped_refptr<FakeTiledLayer> layer =
541 layer_tree_host_->root_layer()->AddChild(layer);
546 layer->fake_layer_updater()->SetRectToInvalidate(
547 gfx::Rect(0, 50, 100, 50), layer.get());
548 layer->SetBounds(gfx::Size(100, 200));
550 layer->draw_properties().visible_content_rect = gfx::Rect(0, 0, 100, 200);
551 UpdateAndPush(layer, layer_impl);
572 // Invalidate a tile on layer1, during update of layer 2.
621 // so the layer is considered small enough.
624 // Create a layer with 5x5 tiles, with 4x4 size viewport.
639 scoped_refptr<FakeTiledLayer> layer =
645 layer_tree_host_->root_layer()->AddChild(layer);
647 // Full size layer with half being visible.
648 layer->SetBounds(gfx::Size(layer_width, layer_height));
652 // Pretend the layer is animating.
653 layer->draw_properties().target_space_transform_is_animating = true;
654 layer->draw_properties().visible_content_rect = visible_rect;
655 layer->SetLayerTreeHost(layer_tree_host_.get());
657 // The layer should paint its entire contents on the first paint
659 layer->SetTexturePriorities(priority_calculator_);
661 layer->SavePaintProperties();
662 layer->Update(queue_.get(), NULL);
664 LayerPushPropertiesTo(layer.get(), layer_impl.get());
666 // We should have all the tiles for the small animated layer.
681 layer->RemoveFromParent();
686 scoped_refptr<FakeTiledLayer> layer =
692 layer_tree_host_->root_layer()->AddChild(layer);
701 layer->SetBounds(gfx::Size(300, 300));
703 layer->draw_properties().visible_content_rect = gfx::Rect(100, 100, 100, 100);
705 needs_update = UpdateAndPush(layer, layer_impl);
715 scoped_refptr<FakeTiledLayer> layer =
720 layer_tree_host_->root_layer()->AddChild(layer);
724 // Pretend the layer is animating.
725 layer->draw_properties().target_space_transform_is_animating = animating[i];
727 // The layer's bounds are empty.
729 layer->SetBounds(gfx::Size());
733 layer->draw_properties().visible_content_rect = gfx::Rect();
734 bool needs_update = UpdateAndPush(layer, layer_impl);
737 EXPECT_EQ(0u, layer->NumPaintedTiles());
748 scoped_refptr<FakeTiledLayer> layer =
760 // We should not have any tiles except for when the layer was visible
761 // or after the layer was visible and we didn't invalidate.
765 layer_tree_host_->root_layer()->AddChild(layer);
768 layer->SetBounds(gfx::Size(100, 100));
772 layer->draw_properties().visible_content_rect = visible_rect[i];
775 layer->InvalidateContentRect(gfx::Rect(0, 0, 100, 100));
776 bool needs_update = UpdateAndPush(layer, layer_impl);
778 // We should never signal idle paint, as we painted the entire layer
779 // or the layer was not visible.
786 scoped_refptr<FakeTiledLayer> layer =
792 layer_tree_host_->root_layer()->AddChild(layer);
795 layer->SetBounds(gfx::Size(100, 200));
797 layer->draw_properties().visible_content_rect = gfx::Rect(0, 0, 100, 200);
798 UpdateAndPush(layer, layer_impl);
804 layer->fake_layer_updater()->ClearPrepareCount();
805 // Invoke update again. As the layer is valid update shouldn't be invoked on
807 UpdateAndPush(layer, layer_impl);
808 EXPECT_EQ(0, layer->fake_layer_updater()->prepare_count());
812 layer->fake_layer_updater()->SetRectToInvalidate(
813 gfx::Rect(25, 25, 50, 50), layer.get());
814 layer->fake_layer_updater()->ClearPrepareCount();
815 layer->InvalidateContentRect(gfx::Rect(0, 0, 50, 50));
816 UpdateAndPush(layer, layer_impl);
817 EXPECT_EQ(1, layer->fake_layer_updater()->prepare_count());
818 layer->fake_layer_updater()->ClearPrepareCount();
820 // The layer should still be invalid as update invoked invalidate.
821 UpdateAndPush(layer, layer_impl); // visible
822 EXPECT_EQ(1, layer->fake_layer_updater()->prepare_count());
827 // layer space, not the content space.
828 scoped_refptr<FakeTiledLayerWithScaledBounds> layer = make_scoped_refptr(
831 layer_tree_host_->root_layer()->AddChild(layer);
836 layer->SetBounds(layer_bounds.size());
837 layer->SetContentBounds(content_bounds.size());
838 layer->draw_properties().visible_content_rect = content_bounds;
841 // boundaries of the layer.
842 // However, it should still be in layer space, not content space.
843 layer->InvalidateContentRect(content_bounds);
845 layer->SetTexturePriorities(priority_calculator_);
847 layer->SavePaintProperties();
848 layer->Update(queue_.get(), NULL);
849 EXPECT_FLOAT_RECT_EQ(gfx::RectF(0, 0, 300, 300 * 0.8), layer->update_rect());
853 // the bounds of the layer.
854 layer->SetTexturePriorities(priority_calculator_);
856 layer->InvalidateContentRect(content_bounds);
857 layer->SavePaintProperties();
858 layer->Update(queue_.get(), NULL);
859 EXPECT_FLOAT_RECT_EQ(gfx::RectF(layer_bounds), layer->update_rect());
862 // Partial re-paint should also be represented by the update rect in layer
865 layer->InvalidateContentRect(partial_damage);
866 layer->SetTexturePriorities(priority_calculator_);
868 layer->SavePaintProperties();
869 layer->Update(queue_.get(), NULL);
870 EXPECT_FLOAT_RECT_EQ(gfx::RectF(45, 80, 15, 8), layer->update_rect());
874 scoped_refptr<FakeTiledLayer> layer =
880 layer_tree_host_->root_layer()->AddChild(layer);
882 // Create a layer with one tile.
883 layer->SetBounds(gfx::Size(100, 100));
885 layer->draw_properties().visible_content_rect = gfx::Rect(0, 0, 100, 100);
886 layer->Update(queue_.get(), NULL);
889 layer->last_needs_display_rect());
892 layer->SetTexturePriorities(priority_calculator_);
894 layer->SavePaintProperties();
895 layer->Update(queue_.get(), NULL);
897 LayerPushPropertiesTo(layer.get(), layer_impl.get());
903 layer->SetNeedsDisplayRect(gfx::Rect());
904 EXPECT_FLOAT_RECT_EQ(gfx::RectF(), layer->last_needs_display_rect());
907 layer->UpdateContentsScale(2.f);
908 layer->draw_properties().visible_content_rect = gfx::Rect(0, 0, 200, 200);
911 layer->SetTexturePriorities(priority_calculator_);
913 layer->SavePaintProperties();
914 layer->Update(queue_.get(), NULL);
916 LayerPushPropertiesTo(layer.get(), layer_impl.get());
923 // that the layer-space rectangle requiring painting is not scaled.
925 layer->last_needs_display_rect());
927 // Invalidate the entire layer again, but do not paint. All tiles should be
929 layer->SetNeedsDisplay();
930 layer->SetTexturePriorities(priority_calculator_);
933 LayerPushPropertiesTo(layer.get(), layer_impl.get());
970 // We'll skip the root layer.
976 // Remove the child layer.
988 scoped_refptr<FakeTiledLayer> layer =
991 layer_tree_host_->root_layer()->AddChild(layer);
993 layer->SetBounds(gfx::Size(700, 700));
994 layer->draw_properties().visible_content_rect = gfx::Rect(0, 0, 700, 700);
995 layer->InvalidateContentRect(gfx::Rect(0, 0, 700, 700));
997 layer->SetTexturePriorities(priority_calculator_);
999 layer->SavePaintProperties();
1000 layer->Update(queue_.get(), NULL);
1002 layer->SetBounds(gfx::Size(200, 200));
1003 layer->InvalidateContentRect(gfx::Rect(0, 0, 200, 200));
1007 scoped_refptr<FakeTiledLayer> layer =
1010 layer_tree_host_->root_layer()->AddChild(layer);
1013 layer->SetBounds(gfx::Size(size, size));
1014 layer->draw_properties().visible_content_rect = gfx::Rect(0, 0, 700, 700);
1015 layer->InvalidateContentRect(gfx::Rect(0, 0, size, size));
1018 layer->SetTexturePriorities(priority_calculator_);
1020 layer->SavePaintProperties();
1021 layer->Update(queue_.get(), NULL);
1030 // Create one 300 x 200 tiled layer with 3 x 2 tiles.
1034 scoped_refptr<FakeTiledLayer> layer = make_scoped_refptr(
1036 layer->SetBounds(content_bounds);
1037 layer->SetPosition(gfx::PointF(0, 0));
1038 layer->draw_properties().visible_content_rect = content_rect;
1039 layer->InvalidateContentRect(content_rect);
1041 layer_tree_host_->SetRootLayer(layer);
1052 EXPECT_EQ(6, layer->fake_layer_updater()->update_count());
1054 layer->fake_layer_updater()->ClearUpdateCount();
1055 LayerPushPropertiesTo(layer.get(), layer_impl.get());
1060 layer->InvalidateContentRect(gfx::Rect(0, 0, 300, 150));
1068 EXPECT_EQ(6, layer->fake_layer_updater()->update_count());
1070 layer->fake_layer_updater()->ClearUpdateCount();
1071 LayerPushPropertiesTo(layer.get(), layer_impl.get());
1076 layer->InvalidateContentRect(gfx::Rect(50, 50, 200, 100));
1084 EXPECT_EQ(6, layer->fake_layer_updater()->update_count());
1086 layer->fake_layer_updater()->ClearUpdateCount();
1087 LayerPushPropertiesTo(layer.get(), layer_impl.get());
1092 layer->InvalidateContentRect(gfx::Rect(0, 0, 300, 200));
1096 LayerPushPropertiesTo(layer.get(), layer_impl.get());
1101 layer->InvalidateContentRect(gfx::Rect(50, 50, 200, 100));
1109 EXPECT_EQ(6, layer->fake_layer_updater()->update_count());
1111 layer->fake_layer_updater()->ClearUpdateCount();
1112 LayerPushPropertiesTo(layer.get(), layer_impl.get());
1117 layer->InvalidateContentRect(gfx::Rect(50, 50, 100, 100));
1125 EXPECT_EQ(4, layer->fake_layer_updater()->update_count());
1127 layer->fake_layer_updater()->ClearUpdateCount();
1128 LayerPushPropertiesTo(layer.get(), layer_impl.get());
1138 scoped_refptr<FakeTiledLayer> layer =
1142 layer_tree_host_->root_layer()->AddChild(layer);
1145 layer->SetBounds(gfx::Size(100, 200));
1148 layer->SetTexturePriorities(priority_calculator_);
1150 layer->SavePaintProperties();
1151 layer->Update(queue_.get(), NULL);
1152 EXPECT_EQ(2, layer->fake_layer_updater()->update_count());
1156 scoped_refptr<FakeTiledLayer> layer =
1162 layer_tree_host_->root_layer()->AddChild(layer);
1167 layer->SetBounds(gfx::Size(600, 600));
1171 layer->draw_properties().drawable_content_rect =
1172 gfx::Rect(layer->content_bounds());
1173 layer->draw_properties().visible_content_rect =
1174 gfx::Rect(layer->content_bounds());
1175 layer->InvalidateContentRect(gfx::Rect(0, 0, 600, 600));
1177 layer->SetTexturePriorities(priority_calculator_);
1179 layer->SavePaintProperties();
1180 layer->Update(queue_.get(), &occluded);
1181 EXPECT_EQ(36 - 3, layer->fake_layer_updater()->update_count());
1188 layer->fake_layer_updater()->ClearUpdateCount();
1189 layer->SetTexturePriorities(priority_calculator_);
1193 layer->InvalidateContentRect(gfx::Rect(0, 0, 600, 600));
1194 layer->SavePaintProperties();
1195 layer->Update(queue_.get(), &occluded);
1196 EXPECT_EQ(36 - 2, layer->fake_layer_updater()->update_count());
1204 layer->fake_layer_updater()->ClearUpdateCount();
1205 layer->SetTexturePriorities(priority_calculator_);
1209 layer->InvalidateContentRect(gfx::Rect(0, 0, 600, 600));
1210 layer->SavePaintProperties();
1211 layer->Update(queue_.get(), &occluded);
1212 EXPECT_EQ(36, layer->fake_layer_updater()->update_count());
1222 scoped_refptr<FakeTiledLayer> layer =
1228 layer_tree_host_->root_layer()->AddChild(layer);
1233 layer->SetBounds(gfx::Size(600, 600));
1239 layer->draw_properties().drawable_content_rect = gfx::Rect(0, 0, 600, 360);
1240 layer->draw_properties().visible_content_rect = gfx::Rect(0, 0, 600, 360);
1241 layer->InvalidateContentRect(gfx::Rect(0, 0, 600, 600));
1243 layer->SetTexturePriorities(priority_calculator_);
1245 layer->SavePaintProperties();
1246 layer->Update(queue_.get(), &occluded);
1247 EXPECT_EQ(24 - 3, layer->fake_layer_updater()->update_count());
1254 layer->fake_layer_updater()->ClearUpdateCount();
1259 layer->draw_properties().drawable_content_rect = gfx::Rect(0, 0, 600, 350);
1260 layer->draw_properties().visible_content_rect = gfx::Rect(0, 0, 600, 350);
1261 layer->InvalidateContentRect(gfx::Rect(0, 0, 600, 600));
1262 layer->SetTexturePriorities(priority_calculator_);
1264 layer->SavePaintProperties();
1265 layer->Update(queue_.get(), &occluded);
1266 EXPECT_EQ(24 - 6, layer->fake_layer_updater()->update_count());
1274 layer->fake_layer_updater()->ClearUpdateCount();
1279 layer->draw_properties().drawable_content_rect = gfx::Rect(0, 0, 600, 340);
1280 layer->draw_properties().visible_content_rect = gfx::Rect(0, 0, 600, 340);
1281 layer->InvalidateContentRect(gfx::Rect(0, 0, 600, 600));
1282 layer->SetTexturePriorities(priority_calculator_);
1284 layer->SavePaintProperties();
1285 layer->Update(queue_.get(), &occluded);
1286 EXPECT_EQ(24 - 6, layer->fake_layer_updater()->update_count());
1296 scoped_refptr<FakeTiledLayer> layer =
1302 layer_tree_host_->root_layer()->AddChild(layer);
1307 layer->SetBounds(gfx::Size(600, 600));
1311 layer->draw_properties().drawable_content_rect = gfx::Rect(0, 0, 600, 600);
1312 layer->draw_properties().visible_content_rect = gfx::Rect(0, 0, 600, 600);
1313 layer->InvalidateContentRect(gfx::Rect(0, 0, 600, 600));
1314 layer->SetTexturePriorities(priority_calculator_);
1316 layer->SavePaintProperties();
1317 layer->Update(queue_.get(), &occluded);
1318 EXPECT_EQ(36 - 3, layer->fake_layer_updater()->update_count());
1326 layer->fake_layer_updater()->ClearUpdateCount();
1327 layer->SetTexturePriorities(priority_calculator_);
1329 layer->SavePaintProperties();
1333 layer->Update(queue_.get(), &occluded);
1334 EXPECT_EQ(3, layer->fake_layer_updater()->update_count());
1343 scoped_refptr<FakeTiledLayer> layer =
1349 layer_tree_host_->root_layer()->AddChild(layer);
1354 // space) is transformed differently than the layer.
1356 layer->SetBounds(gfx::Size(600, 600));
1360 layer->draw_properties().screen_space_transform = screen_transform;
1361 layer->draw_properties().target_space_transform = screen_transform;
1364 layer->draw_properties().drawable_content_rect =
1365 gfx::Rect(layer->content_bounds());
1366 layer->draw_properties().visible_content_rect =
1367 gfx::Rect(layer->content_bounds());
1368 layer->InvalidateContentRect(gfx::Rect(0, 0, 600, 600));
1369 layer->SetTexturePriorities(priority_calculator_);
1371 layer->SavePaintProperties();
1372 layer->Update(queue_.get(), &occluded);
1373 EXPECT_EQ(36 - 3, layer->fake_layer_updater()->update_count());
1382 scoped_refptr<FakeTiledLayer> layer =
1399 // a different layer space.
1401 layer->SetAnchorPoint(gfx::PointF());
1402 layer->SetBounds(gfx::Size(300, 300));
1403 scale_layer->AddChild(layer);
1405 EXPECT_FLOAT_EQ(2.f, layer->contents_scale_x());
1406 EXPECT_FLOAT_EQ(2.f, layer->contents_scale_y());
1408 layer->content_bounds().ToString());
1412 layer->draw_properties().drawable_content_rect =
1413 gfx::Rect(layer->bounds());
1414 layer->draw_properties().visible_content_rect =
1415 gfx::Rect(layer->content_bounds());
1416 layer->InvalidateContentRect(gfx::Rect(0, 0, 600, 600));
1417 layer->SetTexturePriorities(priority_calculator_);
1419 layer->SavePaintProperties();
1420 layer->Update(queue_.get(), &occluded);
1422 EXPECT_EQ(visible_tiles1, layer->fake_layer_updater()->update_count());
1430 layer->fake_layer_updater()->ClearUpdateCount();
1434 layer->draw_properties().drawable_content_rect =
1435 gfx::Rect(layer->bounds());
1436 layer->draw_properties().visible_content_rect =
1437 gfx::Rect(layer->content_bounds());
1438 layer->InvalidateContentRect(gfx::Rect(0, 0, 600, 600));
1439 layer->SetTexturePriorities(priority_calculator_);
1441 layer->SavePaintProperties();
1442 layer->Update(queue_.get(), &occluded);
1444 EXPECT_EQ(visible_tiles2, layer->fake_layer_updater()->update_count());
1453 layer->fake_layer_updater()->ClearUpdateCount();
1460 layer->draw_properties().screen_space_transform = screen_transform;
1461 layer->draw_properties().target_space_transform = screen_transform;
1466 gfx::Rect layer_bounds_rect(layer->bounds());
1467 layer->draw_properties().drawable_content_rect =
1469 layer->draw_properties().visible_content_rect =
1470 gfx::Rect(layer->content_bounds());
1471 layer->InvalidateContentRect(gfx::Rect(0, 0, 600, 600));
1472 layer->SetTexturePriorities(priority_calculator_);
1474 layer->SavePaintProperties();
1475 layer->Update(queue_.get(), &occluded);
1477 EXPECT_EQ(visible_tiles3, layer->fake_layer_updater()->update_count());
1489 scoped_refptr<FakeTiledLayer> layer =
1496 layer_tree_host_->root_layer()->AddChild(layer);
1507 layer->SetBounds(content_bounds.size());
1509 layer->draw_properties().drawable_content_rect = visible_bounds;
1510 layer->draw_properties().visible_content_rect = visible_bounds;
1512 // If the layer doesn't paint opaque content, then the
1514 layer->fake_layer_updater()->SetOpaquePaintRect(gfx::Rect());
1515 layer->InvalidateContentRect(content_bounds);
1516 layer->SetTexturePriorities(priority_calculator_);
1518 layer->SavePaintProperties();
1519 layer->Update(queue_.get(), &occluded);
1520 opaque_contents = layer->VisibleContentOpaqueRegion();
1532 layer->fake_layer_updater()->SetOpaquePaintRect(opaque_paint_rect);
1533 layer->InvalidateContentRect(content_bounds);
1534 layer->SetTexturePriorities(priority_calculator_);
1536 layer->SavePaintProperties();
1537 layer->Update(queue_.get(), &occluded);
1539 opaque_contents = layer->VisibleContentOpaqueRegion();
1551 layer->fake_layer_updater()->SetOpaquePaintRect(gfx::Rect());
1552 layer->SetTexturePriorities(priority_calculator_);
1554 layer->SavePaintProperties();
1555 layer->Update(queue_.get(), &occluded);
1557 opaque_contents = layer->VisibleContentOpaqueRegion();
1570 layer->fake_layer_updater()->SetOpaquePaintRect(gfx::Rect());
1571 layer->InvalidateContentRect(gfx::Rect(0, 0, 1, 1));
1572 layer->SetTexturePriorities(priority_calculator_);
1574 layer->SavePaintProperties();
1575 layer->Update(queue_.get(), &occluded);
1577 opaque_contents = layer->VisibleContentOpaqueRegion();
1590 layer->fake_layer_updater()->SetOpaquePaintRect(gfx::Rect());
1591 layer->InvalidateContentRect(gfx::Rect(10, 10, 1, 1));
1592 layer->SetTexturePriorities(priority_calculator_);
1594 layer->SavePaintProperties();
1595 layer->Update(queue_.get(), &occluded);
1597 opaque_contents = layer->VisibleContentOpaqueRegion();
1612 scoped_refptr<FakeTiledLayer> layer =
1619 layer_tree_host_->root_layer()->AddChild(layer);
1628 layer->SetBounds(content_bounds.size());
1631 // Invalidates and paints the whole layer.
1632 layer->fake_layer_updater()->SetOpaquePaintRect(gfx::Rect());
1633 layer->InvalidateContentRect(content_bounds);
1634 layer->SetTexturePriorities(priority_calculator_);
1636 layer->SavePaintProperties();
1637 layer->Update(queue_.get(), &occluded);
1639 opaque_contents = layer->VisibleContentOpaqueRegion();
1651 layer->fake_layer_updater()->SetOpaquePaintRect(gfx::Rect());
1652 layer->InvalidateContentRect(gfx::Rect(0, 0, 1, 1));
1653 layer->InvalidateContentRect(gfx::Rect(50, 200, 10, 10));
1654 layer->SetTexturePriorities(priority_calculator_);
1656 layer->SavePaintProperties();
1657 layer->Update(queue_.get(), &occluded);
1659 opaque_contents = layer->VisibleContentOpaqueRegion();
1750 // With a memory limit that includes only the root layer (3x2 tiles) and half
1792 // With a memory limit that includes only half the root layer, no contents
1886 scoped_refptr<UpdateTrackingTiledLayer> layer =
1889 layer_tree_host_->root_layer()->AddChild(layer);
1892 layer->SetPosition(layer_rect.origin());
1893 layer->SetBounds(layer_rect.size());
1894 layer->UpdateContentsScale(1.5f);
1897 EXPECT_EQ(content_rect.size(), layer->content_bounds());
1898 layer->draw_properties().visible_content_rect = content_rect;
1899 layer->draw_properties().drawable_content_rect = content_rect;
1901 layer->SetTexturePriorities(priority_calculator_);
1903 layer->SavePaintProperties();
1906 layer->Update(queue_.get(), NULL);
1907 layer->tracking_layer_painter()->ResetPaintedRect();
1909 EXPECT_RECT_EQ(gfx::Rect(), layer->tracking_layer_painter()->PaintedRect());
1912 // Invalidate the entire layer in content space. When painting, the rect given
1913 // to webkit should match the layer's bounds.
1914 layer->InvalidateContentRect(content_rect);
1915 layer->Update(queue_.get(), NULL);
1917 EXPECT_RECT_EQ(layer_rect, layer->tracking_layer_painter()->PaintedRect());
1922 scoped_refptr<UpdateTrackingTiledLayer> layer =
1925 layer_tree_host_->root_layer()->AddChild(layer);
1928 layer->SetPosition(layer_rect.origin());
1929 layer->SetBounds(layer_rect.size());
1930 layer->UpdateContentsScale(1.3f);
1932 gfx::Rect content_rect(layer->content_bounds());
1933 layer->draw_properties().visible_content_rect = content_rect;
1934 layer->draw_properties().drawable_content_rect = content_rect;
1936 layer->SetTexturePriorities(priority_calculator_);
1938 layer->SavePaintProperties();
1941 layer->Update(queue_.get(), NULL);
1942 layer->tracking_layer_painter()->ResetPaintedRect();
1944 EXPECT_RECT_EQ(gfx::Rect(), layer->tracking_layer_painter()->PaintedRect());
1947 // Invalidate the entire layer in layer space. When painting, the rect given
1948 // to webkit should match the layer's bounds.
1949 layer->SetNeedsDisplayRect(layer_rect);
1950 layer->Update(queue_.get(), NULL);
1952 EXPECT_RECT_EQ(layer_rect, layer->tracking_layer_painter()->PaintedRect());