| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "cc/layers/picture_layer_impl.h" | 5 #include "cc/layers/picture_layer_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <limits> | 8 #include <limits> |
| 9 | 9 |
| 10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
| 11 #include "cc/base/math_util.h" | 11 #include "cc/base/math_util.h" |
| 12 #include "cc/base/util.h" | 12 #include "cc/base/util.h" |
| 13 #include "cc/debug/debug_colors.h" | 13 #include "cc/debug/debug_colors.h" |
| 14 #include "cc/debug/micro_benchmark_impl.h" | 14 #include "cc/debug/micro_benchmark_impl.h" |
| 15 #include "cc/debug/traced_value.h" | 15 #include "cc/debug/traced_value.h" |
| 16 #include "cc/layers/append_quads_data.h" | 16 #include "cc/layers/append_quads_data.h" |
| 17 #include "cc/layers/quad_sink.h" | 17 #include "cc/layers/quad_sink.h" |
| 18 #include "cc/quads/checkerboard_draw_quad.h" | 18 #include "cc/quads/checkerboard_draw_quad.h" |
| 19 #include "cc/quads/debug_border_draw_quad.h" | 19 #include "cc/quads/debug_border_draw_quad.h" |
| 20 #include "cc/quads/picture_draw_quad.h" | 20 #include "cc/quads/picture_draw_quad.h" |
| 21 #include "cc/quads/solid_color_draw_quad.h" | 21 #include "cc/quads/solid_color_draw_quad.h" |
| 22 #include "cc/quads/tile_draw_quad.h" | 22 #include "cc/quads/tile_draw_quad.h" |
| 23 #include "cc/resources/tile_manager.h" | 23 #include "cc/resources/tile_manager.h" |
| 24 #include "cc/trees/layer_tree_impl.h" | |
| 25 #include "ui/gfx/quad_f.h" | 24 #include "ui/gfx/quad_f.h" |
| 26 #include "ui/gfx/rect_conversions.h" | 25 #include "ui/gfx/rect_conversions.h" |
| 27 #include "ui/gfx/size_conversions.h" | 26 #include "ui/gfx/size_conversions.h" |
| 28 | 27 |
| 29 namespace { | 28 namespace { |
| 30 const float kMaxScaleRatioDuringPinch = 2.0f; | 29 const float kMaxScaleRatioDuringPinch = 2.0f; |
| 31 | 30 |
| 32 // When creating a new tiling during pinch, snap to an existing | 31 // When creating a new tiling during pinch, snap to an existing |
| 33 // tiling's scale if the desired scale is within this ratio. | 32 // tiling's scale if the desired scale is within this ratio. |
| 34 const float kSnapToExistingTilingRatio = 0.2f; | 33 const float kSnapToExistingTilingRatio = 0.2f; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 56 raster_device_scale_(0.f), | 55 raster_device_scale_(0.f), |
| 57 raster_source_scale_(0.f), | 56 raster_source_scale_(0.f), |
| 58 raster_contents_scale_(0.f), | 57 raster_contents_scale_(0.f), |
| 59 low_res_raster_contents_scale_(0.f), | 58 low_res_raster_contents_scale_(0.f), |
| 60 raster_source_scale_is_fixed_(false), | 59 raster_source_scale_is_fixed_(false), |
| 61 was_animating_transform_to_screen_(false), | 60 was_animating_transform_to_screen_(false), |
| 62 is_using_lcd_text_(tree_impl->settings().can_use_lcd_text), | 61 is_using_lcd_text_(tree_impl->settings().can_use_lcd_text), |
| 63 needs_post_commit_initialization_(true), | 62 needs_post_commit_initialization_(true), |
| 64 should_update_tile_priorities_(false), | 63 should_update_tile_priorities_(false), |
| 65 should_use_low_res_tiling_(tree_impl->settings().create_low_res_tiling), | 64 should_use_low_res_tiling_(tree_impl->settings().create_low_res_tiling), |
| 66 use_gpu_rasterization_(false), | |
| 67 layer_needs_to_register_itself_(true) { | 65 layer_needs_to_register_itself_(true) { |
| 68 } | 66 } |
| 69 | 67 |
| 70 PictureLayerImpl::~PictureLayerImpl() { | 68 PictureLayerImpl::~PictureLayerImpl() { |
| 71 if (!layer_needs_to_register_itself_) | 69 if (!layer_needs_to_register_itself_) |
| 72 layer_tree_impl()->tile_manager()->UnregisterPictureLayerImpl(this); | 70 layer_tree_impl()->tile_manager()->UnregisterPictureLayerImpl(this); |
| 73 } | 71 } |
| 74 | 72 |
| 75 const char* PictureLayerImpl::LayerTypeAsString() const { | 73 const char* PictureLayerImpl::LayerTypeAsString() const { |
| 76 return "cc::PictureLayerImpl"; | 74 return "cc::PictureLayerImpl"; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 98 | 96 |
| 99 LayerImpl::PushPropertiesTo(base_layer); | 97 LayerImpl::PushPropertiesTo(base_layer); |
| 100 | 98 |
| 101 // When the pending tree pushes to the active tree, the pending twin | 99 // When the pending tree pushes to the active tree, the pending twin |
| 102 // disappears. | 100 // disappears. |
| 103 layer_impl->twin_layer_ = NULL; | 101 layer_impl->twin_layer_ = NULL; |
| 104 twin_layer_ = NULL; | 102 twin_layer_ = NULL; |
| 105 | 103 |
| 106 layer_impl->SetIsMask(is_mask_); | 104 layer_impl->SetIsMask(is_mask_); |
| 107 layer_impl->pile_ = pile_; | 105 layer_impl->pile_ = pile_; |
| 108 layer_impl->use_gpu_rasterization_ = use_gpu_rasterization_; | |
| 109 | 106 |
| 110 // Tilings would be expensive to push, so we swap. | 107 // Tilings would be expensive to push, so we swap. |
| 111 layer_impl->tilings_.swap(tilings_); | 108 layer_impl->tilings_.swap(tilings_); |
| 112 | 109 |
| 113 // Ensure that we don't have any tiles that are out of date. | 110 // Ensure that we don't have any tiles that are out of date. |
| 114 if (tilings_) | 111 if (tilings_) |
| 115 tilings_->RemoveTilesInRegion(invalidation_); | 112 tilings_->RemoveTilesInRegion(invalidation_); |
| 116 | 113 |
| 117 layer_impl->tilings_->SetClient(layer_impl); | 114 layer_impl->tilings_->SetClient(layer_impl); |
| 118 if (tilings_) | 115 if (tilings_) |
| (...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 516 *contents_scale_x = max_contents_scale; | 513 *contents_scale_x = max_contents_scale; |
| 517 *contents_scale_y = max_contents_scale; | 514 *contents_scale_y = max_contents_scale; |
| 518 *content_bounds = gfx::ToCeiledSize( | 515 *content_bounds = gfx::ToCeiledSize( |
| 519 gfx::ScaleSize(bounds(), max_contents_scale, max_contents_scale)); | 516 gfx::ScaleSize(bounds(), max_contents_scale, max_contents_scale)); |
| 520 } | 517 } |
| 521 | 518 |
| 522 skia::RefPtr<SkPicture> PictureLayerImpl::GetPicture() { | 519 skia::RefPtr<SkPicture> PictureLayerImpl::GetPicture() { |
| 523 return pile_->GetFlattenedPicture(); | 520 return pile_->GetFlattenedPicture(); |
| 524 } | 521 } |
| 525 | 522 |
| 526 void PictureLayerImpl::SetUseGpuRasterization(bool use_gpu) { | |
| 527 if (use_gpu_rasterization_ == use_gpu) | |
| 528 return; | |
| 529 | |
| 530 use_gpu_rasterization_ = use_gpu; | |
| 531 RemoveAllTilings(); | |
| 532 } | |
| 533 | |
| 534 scoped_refptr<Tile> PictureLayerImpl::CreateTile(PictureLayerTiling* tiling, | 523 scoped_refptr<Tile> PictureLayerImpl::CreateTile(PictureLayerTiling* tiling, |
| 535 const gfx::Rect& content_rect) { | 524 const gfx::Rect& content_rect) { |
| 536 if (!pile_->CanRaster(tiling->contents_scale(), content_rect)) | 525 if (!pile_->CanRaster(tiling->contents_scale(), content_rect)) |
| 537 return scoped_refptr<Tile>(); | 526 return scoped_refptr<Tile>(); |
| 538 | 527 |
| 539 int flags = 0; | 528 int flags = 0; |
| 540 if (is_using_lcd_text_) | 529 if (is_using_lcd_text_) |
| 541 flags |= Tile::USE_LCD_TEXT; | 530 flags |= Tile::USE_LCD_TEXT; |
| 542 if (ShouldUseGpuRasterization()) | 531 if (use_gpu_rasterization()) |
| 543 flags |= Tile::USE_GPU_RASTERIZATION; | 532 flags |= Tile::USE_GPU_RASTERIZATION; |
| 544 return layer_tree_impl()->tile_manager()->CreateTile( | 533 return layer_tree_impl()->tile_manager()->CreateTile( |
| 545 pile_.get(), | 534 pile_.get(), |
| 546 content_rect.size(), | 535 content_rect.size(), |
| 547 content_rect, | 536 content_rect, |
| 548 contents_opaque() ? content_rect : gfx::Rect(), | 537 contents_opaque() ? content_rect : gfx::Rect(), |
| 549 tiling->contents_scale(), | 538 tiling->contents_scale(), |
| 550 id(), | 539 id(), |
| 551 layer_tree_impl()->source_frame_number(), | 540 layer_tree_impl()->source_frame_number(), |
| 552 flags); | 541 flags); |
| 553 } | 542 } |
| 554 | 543 |
| 555 void PictureLayerImpl::UpdatePile(Tile* tile) { | 544 void PictureLayerImpl::UpdatePile(Tile* tile) { |
| 556 tile->set_picture_pile(pile_); | 545 tile->set_picture_pile(pile_); |
| 557 } | 546 } |
| 558 | 547 |
| 559 const Region* PictureLayerImpl::GetInvalidation() { | 548 const Region* PictureLayerImpl::GetInvalidation() { |
| 560 return &invalidation_; | 549 return &invalidation_; |
| 561 } | 550 } |
| 562 | 551 |
| 563 const PictureLayerTiling* PictureLayerImpl::GetTwinTiling( | 552 const PictureLayerTiling* PictureLayerImpl::GetTwinTiling( |
| 564 const PictureLayerTiling* tiling) const { | 553 const PictureLayerTiling* tiling) const { |
| 565 | |
| 566 if (!twin_layer_ || | 554 if (!twin_layer_ || |
| 567 twin_layer_->ShouldUseGpuRasterization() != ShouldUseGpuRasterization()) | 555 twin_layer_->use_gpu_rasterization() != use_gpu_rasterization()) |
| 568 return NULL; | 556 return NULL; |
| 569 for (size_t i = 0; i < twin_layer_->tilings_->num_tilings(); ++i) | 557 for (size_t i = 0; i < twin_layer_->tilings_->num_tilings(); ++i) |
| 570 if (twin_layer_->tilings_->tiling_at(i)->contents_scale() == | 558 if (twin_layer_->tilings_->tiling_at(i)->contents_scale() == |
| 571 tiling->contents_scale()) | 559 tiling->contents_scale()) |
| 572 return twin_layer_->tilings_->tiling_at(i); | 560 return twin_layer_->tilings_->tiling_at(i); |
| 573 return NULL; | 561 return NULL; |
| 574 } | 562 } |
| 575 | 563 |
| 576 size_t PictureLayerImpl::GetMaxTilesForInterestArea() const { | 564 size_t PictureLayerImpl::GetMaxTilesForInterestArea() const { |
| 577 return layer_tree_impl()->settings().max_tiles_for_interest_area; | 565 return layer_tree_impl()->settings().max_tiles_for_interest_area; |
| 578 } | 566 } |
| 579 | 567 |
| 580 float PictureLayerImpl::GetSkewportTargetTimeInSeconds() const { | 568 float PictureLayerImpl::GetSkewportTargetTimeInSeconds() const { |
| 581 float skewport_target_time_in_frames = ShouldUseGpuRasterization() | 569 float skewport_target_time_in_frames = use_gpu_rasterization() |
| 582 ? kGpuSkewportTargetTimeInFrames | 570 ? kGpuSkewportTargetTimeInFrames |
| 583 : kCpuSkewportTargetTimeInFrames; | 571 : kCpuSkewportTargetTimeInFrames; |
| 584 return skewport_target_time_in_frames * | 572 return skewport_target_time_in_frames * |
| 585 layer_tree_impl()->begin_impl_frame_interval().InSecondsF() * | 573 layer_tree_impl()->begin_impl_frame_interval().InSecondsF() * |
| 586 layer_tree_impl()->settings().skewport_target_time_multiplier; | 574 layer_tree_impl()->settings().skewport_target_time_multiplier; |
| 587 } | 575 } |
| 588 | 576 |
| 589 int PictureLayerImpl::GetSkewportExtrapolationLimitInContentPixels() const { | 577 int PictureLayerImpl::GetSkewportExtrapolationLimitInContentPixels() const { |
| 590 return layer_tree_impl() | 578 return layer_tree_impl() |
| 591 ->settings() | 579 ->settings() |
| 592 .skewport_extrapolation_limit_in_content_pixels; | 580 .skewport_extrapolation_limit_in_content_pixels; |
| 593 } | 581 } |
| 594 | 582 |
| 595 gfx::Size PictureLayerImpl::CalculateTileSize( | 583 gfx::Size PictureLayerImpl::CalculateTileSize( |
| 596 const gfx::Size& content_bounds) const { | 584 const gfx::Size& content_bounds) const { |
| 597 if (is_mask_) { | 585 if (is_mask_) { |
| 598 int max_size = layer_tree_impl()->MaxTextureSize(); | 586 int max_size = layer_tree_impl()->MaxTextureSize(); |
| 599 return gfx::Size( | 587 return gfx::Size( |
| 600 std::min(max_size, content_bounds.width()), | 588 std::min(max_size, content_bounds.width()), |
| 601 std::min(max_size, content_bounds.height())); | 589 std::min(max_size, content_bounds.height())); |
| 602 } | 590 } |
| 603 | 591 |
| 604 int max_texture_size = | 592 int max_texture_size = |
| 605 layer_tree_impl()->resource_provider()->max_texture_size(); | 593 layer_tree_impl()->resource_provider()->max_texture_size(); |
| 606 | 594 |
| 607 gfx::Size default_tile_size = layer_tree_impl()->settings().default_tile_size; | 595 gfx::Size default_tile_size = layer_tree_impl()->settings().default_tile_size; |
| 608 if (ShouldUseGpuRasterization()) { | 596 if (use_gpu_rasterization()) { |
| 609 // TODO(ernstm) crbug.com/365877: We need a unified way to override the | 597 // TODO(ernstm) crbug.com/365877: We need a unified way to override the |
| 610 // default-tile-size. | 598 // default-tile-size. |
| 611 default_tile_size = | 599 default_tile_size = |
| 612 gfx::Size(layer_tree_impl()->device_viewport_size().width(), | 600 gfx::Size(layer_tree_impl()->device_viewport_size().width(), |
| 613 layer_tree_impl()->device_viewport_size().height() / 4); | 601 layer_tree_impl()->device_viewport_size().height() / 4); |
| 614 } | 602 } |
| 615 default_tile_size.SetToMin(gfx::Size(max_texture_size, max_texture_size)); | 603 default_tile_size.SetToMin(gfx::Size(max_texture_size, max_texture_size)); |
| 616 | 604 |
| 617 gfx::Size max_untiled_content_size = | 605 gfx::Size max_untiled_content_size = |
| 618 layer_tree_impl()->settings().max_untiled_layer_size; | 606 layer_tree_impl()->settings().max_untiled_layer_size; |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 914 | 902 |
| 915 PictureLayerTiling* PictureLayerImpl::AddTiling(float contents_scale) { | 903 PictureLayerTiling* PictureLayerImpl::AddTiling(float contents_scale) { |
| 916 DCHECK(CanHaveTilingWithScale(contents_scale)) << | 904 DCHECK(CanHaveTilingWithScale(contents_scale)) << |
| 917 "contents_scale: " << contents_scale; | 905 "contents_scale: " << contents_scale; |
| 918 | 906 |
| 919 PictureLayerTiling* tiling = tilings_->AddTiling(contents_scale); | 907 PictureLayerTiling* tiling = tilings_->AddTiling(contents_scale); |
| 920 | 908 |
| 921 DCHECK(pile_->HasRecordings()); | 909 DCHECK(pile_->HasRecordings()); |
| 922 | 910 |
| 923 if (twin_layer_ && | 911 if (twin_layer_ && |
| 924 twin_layer_->ShouldUseGpuRasterization() == ShouldUseGpuRasterization()) | 912 twin_layer_->use_gpu_rasterization() == use_gpu_rasterization()) |
| 925 twin_layer_->SyncTiling(tiling); | 913 twin_layer_->SyncTiling(tiling); |
| 926 | 914 |
| 927 return tiling; | 915 return tiling; |
| 928 } | 916 } |
| 929 | 917 |
| 930 void PictureLayerImpl::RemoveTiling(float contents_scale) { | 918 void PictureLayerImpl::RemoveTiling(float contents_scale) { |
| 931 for (size_t i = 0; i < tilings_->num_tilings(); ++i) { | 919 for (size_t i = 0; i < tilings_->num_tilings(); ++i) { |
| 932 PictureLayerTiling* tiling = tilings_->tiling_at(i); | 920 PictureLayerTiling* tiling = tilings_->tiling_at(i); |
| 933 if (tiling->contents_scale() == contents_scale) { | 921 if (tiling->contents_scale() == contents_scale) { |
| 934 tilings_->Remove(tiling); | 922 tilings_->Remove(tiling); |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1033 SanityCheckTilingState(); | 1021 SanityCheckTilingState(); |
| 1034 } | 1022 } |
| 1035 | 1023 |
| 1036 bool PictureLayerImpl::ShouldAdjustRasterScale( | 1024 bool PictureLayerImpl::ShouldAdjustRasterScale( |
| 1037 bool animating_transform_to_screen) const { | 1025 bool animating_transform_to_screen) const { |
| 1038 if (was_animating_transform_to_screen_ != animating_transform_to_screen) | 1026 if (was_animating_transform_to_screen_ != animating_transform_to_screen) |
| 1039 return true; | 1027 return true; |
| 1040 | 1028 |
| 1041 if (animating_transform_to_screen && | 1029 if (animating_transform_to_screen && |
| 1042 raster_contents_scale_ != ideal_contents_scale_ && | 1030 raster_contents_scale_ != ideal_contents_scale_ && |
| 1043 ShouldUseGpuRasterization()) | 1031 use_gpu_rasterization()) |
| 1044 return true; | 1032 return true; |
| 1045 | 1033 |
| 1046 bool is_pinching = layer_tree_impl()->PinchGestureActive(); | 1034 bool is_pinching = layer_tree_impl()->PinchGestureActive(); |
| 1047 if (is_pinching && raster_page_scale_) { | 1035 if (is_pinching && raster_page_scale_) { |
| 1048 // We change our raster scale when it is: | 1036 // We change our raster scale when it is: |
| 1049 // - Higher than ideal (need a lower-res tiling available) | 1037 // - Higher than ideal (need a lower-res tiling available) |
| 1050 // - Too far from ideal (need a higher-res tiling available) | 1038 // - Too far from ideal (need a higher-res tiling available) |
| 1051 float ratio = ideal_page_scale_ / raster_page_scale_; | 1039 float ratio = ideal_page_scale_ / raster_page_scale_; |
| 1052 if (raster_page_scale_ > ideal_page_scale_ || | 1040 if (raster_page_scale_ > ideal_page_scale_ || |
| 1053 ratio > kMaxScaleRatioDuringPinch) | 1041 ratio > kMaxScaleRatioDuringPinch) |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1133 raster_page_scale_ = | 1121 raster_page_scale_ = |
| 1134 raster_contents_scale_ / raster_device_scale_ / raster_source_scale_; | 1122 raster_contents_scale_ / raster_device_scale_ / raster_source_scale_; |
| 1135 } | 1123 } |
| 1136 | 1124 |
| 1137 raster_contents_scale_ = | 1125 raster_contents_scale_ = |
| 1138 std::max(raster_contents_scale_, MinimumContentsScale()); | 1126 std::max(raster_contents_scale_, MinimumContentsScale()); |
| 1139 | 1127 |
| 1140 // If we're not re-rasterizing during animation, rasterize at the maximum | 1128 // If we're not re-rasterizing during animation, rasterize at the maximum |
| 1141 // scale that will occur during the animation, if the maximum scale is | 1129 // scale that will occur during the animation, if the maximum scale is |
| 1142 // known. | 1130 // known. |
| 1143 if (animating_transform_to_screen && !ShouldUseGpuRasterization()) { | 1131 if (animating_transform_to_screen && !use_gpu_rasterization()) { |
| 1144 if (maximum_animation_contents_scale > 0.f) { | 1132 if (maximum_animation_contents_scale > 0.f) { |
| 1145 raster_contents_scale_ = | 1133 raster_contents_scale_ = |
| 1146 std::max(raster_contents_scale_, maximum_animation_contents_scale); | 1134 std::max(raster_contents_scale_, maximum_animation_contents_scale); |
| 1147 } else { | 1135 } else { |
| 1148 raster_contents_scale_ = | 1136 raster_contents_scale_ = |
| 1149 std::max(raster_contents_scale_, | 1137 std::max(raster_contents_scale_, |
| 1150 1.f * ideal_page_scale_ * ideal_device_scale_); | 1138 1.f * ideal_page_scale_ * ideal_device_scale_); |
| 1151 } | 1139 } |
| 1152 } | 1140 } |
| 1153 | 1141 |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1323 scoped_ptr<base::DictionaryValue> tile_data(new base::DictionaryValue); | 1311 scoped_ptr<base::DictionaryValue> tile_data(new base::DictionaryValue); |
| 1324 tile_data->Set("geometry_rect", | 1312 tile_data->Set("geometry_rect", |
| 1325 MathUtil::AsValue(iter.geometry_rect()).release()); | 1313 MathUtil::AsValue(iter.geometry_rect()).release()); |
| 1326 if (*iter) | 1314 if (*iter) |
| 1327 tile_data->Set("tile", TracedValue::CreateIDRef(*iter).release()); | 1315 tile_data->Set("tile", TracedValue::CreateIDRef(*iter).release()); |
| 1328 | 1316 |
| 1329 coverage_tiles->Append(tile_data.release()); | 1317 coverage_tiles->Append(tile_data.release()); |
| 1330 } | 1318 } |
| 1331 state->Set("coverage_tiles", coverage_tiles.release()); | 1319 state->Set("coverage_tiles", coverage_tiles.release()); |
| 1332 state->SetBoolean("is_using_lcd_text", is_using_lcd_text_); | 1320 state->SetBoolean("is_using_lcd_text", is_using_lcd_text_); |
| 1333 state->SetBoolean("using_gpu_rasterization", ShouldUseGpuRasterization()); | 1321 state->SetBoolean("using_gpu_rasterization", use_gpu_rasterization()); |
| 1334 } | 1322 } |
| 1335 | 1323 |
| 1336 size_t PictureLayerImpl::GPUMemoryUsageInBytes() const { | 1324 size_t PictureLayerImpl::GPUMemoryUsageInBytes() const { |
| 1337 const_cast<PictureLayerImpl*>(this)->DoPostCommitInitializationIfNeeded(); | 1325 const_cast<PictureLayerImpl*>(this)->DoPostCommitInitializationIfNeeded(); |
| 1338 return tilings_->GPUMemoryUsageInBytes(); | 1326 return tilings_->GPUMemoryUsageInBytes(); |
| 1339 } | 1327 } |
| 1340 | 1328 |
| 1341 void PictureLayerImpl::RunMicroBenchmark(MicroBenchmarkImpl* benchmark) { | 1329 void PictureLayerImpl::RunMicroBenchmark(MicroBenchmarkImpl* benchmark) { |
| 1342 benchmark->RunOnLayer(this); | 1330 benchmark->RunOnLayer(this); |
| 1343 } | 1331 } |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1566 return iterator_index_ < iterators_.size(); | 1554 return iterator_index_ < iterators_.size(); |
| 1567 } | 1555 } |
| 1568 | 1556 |
| 1569 bool PictureLayerImpl::LayerEvictionTileIterator::IsCorrectType( | 1557 bool PictureLayerImpl::LayerEvictionTileIterator::IsCorrectType( |
| 1570 PictureLayerTiling::TilingEvictionTileIterator* it) const { | 1558 PictureLayerTiling::TilingEvictionTileIterator* it) const { |
| 1571 return it->get_type() == iteration_stage_ && | 1559 return it->get_type() == iteration_stage_ && |
| 1572 (**it)->required_for_activation() == required_for_activation_; | 1560 (**it)->required_for_activation() == required_for_activation_; |
| 1573 } | 1561 } |
| 1574 | 1562 |
| 1575 } // namespace cc | 1563 } // namespace cc |
| OLD | NEW |