Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(131)

Side by Side Diff: cc/layers/picture_layer_impl.cc

Issue 935333002: Update from https://crrev.com/316786 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/layers/picture_layer_impl.h ('k') | cc/layers/picture_layer_impl_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <cmath> 8 #include <cmath>
9 #include <limits> 9 #include <limits>
10 #include <set> 10 #include <set>
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 146
147 layer_impl->SanityCheckTilingState(); 147 layer_impl->SanityCheckTilingState();
148 148
149 // We always need to push properties. 149 // We always need to push properties.
150 // See http://crbug.com/303943 150 // See http://crbug.com/303943
151 // TODO(danakj): Stop always pushing properties since we don't swap tilings. 151 // TODO(danakj): Stop always pushing properties since we don't swap tilings.
152 needs_push_properties_ = true; 152 needs_push_properties_ = true;
153 } 153 }
154 154
155 void PictureLayerImpl::AppendQuads(RenderPass* render_pass, 155 void PictureLayerImpl::AppendQuads(RenderPass* render_pass,
156 const Occlusion& occlusion_in_content_space,
157 AppendQuadsData* append_quads_data) { 156 AppendQuadsData* append_quads_data) {
158 // The bounds and the pile size may differ if the pile wasn't updated (ie. 157 // The bounds and the pile size may differ if the pile wasn't updated (ie.
159 // PictureLayer::Update didn't happen). In that case the pile will be empty. 158 // PictureLayer::Update didn't happen). In that case the pile will be empty.
160 DCHECK_IMPLIES(!raster_source_->GetSize().IsEmpty(), 159 DCHECK_IMPLIES(!raster_source_->GetSize().IsEmpty(),
161 bounds() == raster_source_->GetSize()) 160 bounds() == raster_source_->GetSize())
162 << " bounds " << bounds().ToString() << " pile " 161 << " bounds " << bounds().ToString() << " pile "
163 << raster_source_->GetSize().ToString(); 162 << raster_source_->GetSize().ToString();
164 163
165 SharedQuadState* shared_quad_state = 164 SharedQuadState* shared_quad_state =
166 render_pass->CreateAndAppendSharedQuadState(); 165 render_pass->CreateAndAppendSharedQuadState();
167 166
168 if (raster_source_->IsSolidColor()) { 167 if (raster_source_->IsSolidColor()) {
169 PopulateSharedQuadState(shared_quad_state); 168 PopulateSharedQuadState(shared_quad_state);
170 169
171 AppendDebugBorderQuad( 170 AppendDebugBorderQuad(
172 render_pass, bounds(), shared_quad_state, append_quads_data); 171 render_pass, bounds(), shared_quad_state, append_quads_data);
173 172
174 SolidColorLayerImpl::AppendSolidQuads( 173 SolidColorLayerImpl::AppendSolidQuads(
175 render_pass, occlusion_in_content_space, shared_quad_state, 174 render_pass, draw_properties().occlusion_in_content_space,
176 visible_content_rect(), raster_source_->GetSolidColor(), 175 shared_quad_state, visible_content_rect(),
177 append_quads_data); 176 raster_source_->GetSolidColor(), append_quads_data);
178 return; 177 return;
179 } 178 }
180 179
181 float max_contents_scale = MaximumTilingContentsScale(); 180 float max_contents_scale = MaximumTilingContentsScale();
182 gfx::Transform scaled_draw_transform = draw_transform(); 181 PopulateScaledSharedQuadState(shared_quad_state, max_contents_scale);
183 scaled_draw_transform.Scale(SK_MScalar1 / max_contents_scale,
184 SK_MScalar1 / max_contents_scale);
185 gfx::Size scaled_content_bounds =
186 gfx::ToCeiledSize(gfx::ScaleSize(bounds(), max_contents_scale));
187 gfx::Rect scaled_visible_content_rect =
188 gfx::ScaleToEnclosingRect(visible_content_rect(), max_contents_scale);
189 scaled_visible_content_rect.Intersect(gfx::Rect(scaled_content_bounds));
190 Occlusion scaled_occlusion = 182 Occlusion scaled_occlusion =
191 occlusion_in_content_space.GetOcclusionWithGivenDrawTransform( 183 draw_properties()
192 scaled_draw_transform); 184 .occlusion_in_content_space.GetOcclusionWithGivenDrawTransform(
193 185 shared_quad_state->content_to_target_transform);
194 shared_quad_state->SetAll(
195 scaled_draw_transform, scaled_content_bounds, scaled_visible_content_rect,
196 draw_properties().clip_rect, draw_properties().is_clipped,
197 draw_properties().opacity, draw_properties().blend_mode,
198 sorting_context_id_);
199 186
200 if (current_draw_mode_ == DRAW_MODE_RESOURCELESS_SOFTWARE) { 187 if (current_draw_mode_ == DRAW_MODE_RESOURCELESS_SOFTWARE) {
201 AppendDebugBorderQuad( 188 AppendDebugBorderQuad(
202 render_pass, 189 render_pass, shared_quad_state->content_bounds, shared_quad_state,
203 scaled_content_bounds, 190 append_quads_data, DebugColors::DirectPictureBorderColor(),
204 shared_quad_state,
205 append_quads_data,
206 DebugColors::DirectPictureBorderColor(),
207 DebugColors::DirectPictureBorderWidth(layer_tree_impl())); 191 DebugColors::DirectPictureBorderWidth(layer_tree_impl()));
208 192
209 gfx::Rect geometry_rect = scaled_visible_content_rect; 193 gfx::Rect geometry_rect = shared_quad_state->visible_content_rect;
210 gfx::Rect opaque_rect = contents_opaque() ? geometry_rect : gfx::Rect(); 194 gfx::Rect opaque_rect = contents_opaque() ? geometry_rect : gfx::Rect();
211 gfx::Rect visible_geometry_rect = 195 gfx::Rect visible_geometry_rect =
212 scaled_occlusion.GetUnoccludedContentRect(geometry_rect); 196 scaled_occlusion.GetUnoccludedContentRect(geometry_rect);
213 if (visible_geometry_rect.IsEmpty()) 197 if (visible_geometry_rect.IsEmpty())
214 return; 198 return;
215 199
216 gfx::Size texture_size = scaled_visible_content_rect.size(); 200 gfx::Rect quad_content_rect = shared_quad_state->visible_content_rect;
201 gfx::Size texture_size = quad_content_rect.size();
217 gfx::RectF texture_rect = gfx::RectF(texture_size); 202 gfx::RectF texture_rect = gfx::RectF(texture_size);
218 gfx::Rect quad_content_rect = scaled_visible_content_rect;
219 203
220 PictureDrawQuad* quad = 204 PictureDrawQuad* quad =
221 render_pass->CreateAndAppendDrawQuad<PictureDrawQuad>(); 205 render_pass->CreateAndAppendDrawQuad<PictureDrawQuad>();
222 quad->SetNew(shared_quad_state, geometry_rect, opaque_rect, 206 quad->SetNew(shared_quad_state, geometry_rect, opaque_rect,
223 visible_geometry_rect, texture_rect, texture_size, 207 visible_geometry_rect, texture_rect, texture_size,
224 nearest_neighbor_, RGBA_8888, quad_content_rect, 208 nearest_neighbor_, RGBA_8888, quad_content_rect,
225 max_contents_scale, raster_source_); 209 max_contents_scale, raster_source_);
226 return; 210 return;
227 } 211 }
228 212
229 AppendDebugBorderQuad( 213 AppendDebugBorderQuad(render_pass, shared_quad_state->content_bounds,
230 render_pass, scaled_content_bounds, shared_quad_state, append_quads_data); 214 shared_quad_state, append_quads_data);
231 215
232 if (ShowDebugBorders()) { 216 if (ShowDebugBorders()) {
233 for (PictureLayerTilingSet::CoverageIterator iter( 217 for (PictureLayerTilingSet::CoverageIterator iter(
234 tilings_.get(), 218 tilings_.get(), max_contents_scale,
235 max_contents_scale, 219 shared_quad_state->visible_content_rect, ideal_contents_scale_);
236 scaled_visible_content_rect, 220 iter; ++iter) {
237 ideal_contents_scale_);
238 iter;
239 ++iter) {
240 SkColor color; 221 SkColor color;
241 float width; 222 float width;
242 if (*iter && iter->IsReadyToDraw()) { 223 if (*iter && iter->IsReadyToDraw()) {
243 TileDrawInfo::Mode mode = iter->draw_info().mode(); 224 TileDrawInfo::Mode mode = iter->draw_info().mode();
244 if (mode == TileDrawInfo::SOLID_COLOR_MODE) { 225 if (mode == TileDrawInfo::SOLID_COLOR_MODE) {
245 color = DebugColors::SolidColorTileBorderColor(); 226 color = DebugColors::SolidColorTileBorderColor();
246 width = DebugColors::SolidColorTileBorderWidth(layer_tree_impl()); 227 width = DebugColors::SolidColorTileBorderWidth(layer_tree_impl());
247 } else if (mode == TileDrawInfo::PICTURE_PILE_MODE) { 228 } else if (mode == TileDrawInfo::PICTURE_PILE_MODE) {
248 color = DebugColors::PictureTileBorderColor(); 229 color = DebugColors::PictureTileBorderColor();
249 width = DebugColors::PictureTileBorderWidth(layer_tree_impl()); 230 width = DebugColors::PictureTileBorderWidth(layer_tree_impl());
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 264
284 // Ignore missing tiles outside of viewport for tile priority. This is 265 // Ignore missing tiles outside of viewport for tile priority. This is
285 // normally the same as draw viewport but can be independently overridden by 266 // normally the same as draw viewport but can be independently overridden by
286 // embedders like Android WebView with SetExternalDrawConstraints. 267 // embedders like Android WebView with SetExternalDrawConstraints.
287 gfx::Rect scaled_viewport_for_tile_priority = gfx::ScaleToEnclosingRect( 268 gfx::Rect scaled_viewport_for_tile_priority = gfx::ScaleToEnclosingRect(
288 viewport_rect_for_tile_priority_in_content_space_, max_contents_scale); 269 viewport_rect_for_tile_priority_in_content_space_, max_contents_scale);
289 270
290 size_t missing_tile_count = 0u; 271 size_t missing_tile_count = 0u;
291 size_t on_demand_missing_tile_count = 0u; 272 size_t on_demand_missing_tile_count = 0u;
292 only_used_low_res_last_append_quads_ = true; 273 only_used_low_res_last_append_quads_ = true;
293 for (PictureLayerTilingSet::CoverageIterator iter(tilings_.get(), 274 for (PictureLayerTilingSet::CoverageIterator iter(
294 max_contents_scale, 275 tilings_.get(), max_contents_scale,
295 scaled_visible_content_rect, 276 shared_quad_state->visible_content_rect, ideal_contents_scale_);
296 ideal_contents_scale_); 277 iter; ++iter) {
297 iter;
298 ++iter) {
299 gfx::Rect geometry_rect = iter.geometry_rect(); 278 gfx::Rect geometry_rect = iter.geometry_rect();
300 gfx::Rect opaque_rect = contents_opaque() ? geometry_rect : gfx::Rect(); 279 gfx::Rect opaque_rect = contents_opaque() ? geometry_rect : gfx::Rect();
301 gfx::Rect visible_geometry_rect = 280 gfx::Rect visible_geometry_rect =
302 scaled_occlusion.GetUnoccludedContentRect(geometry_rect); 281 scaled_occlusion.GetUnoccludedContentRect(geometry_rect);
303 if (visible_geometry_rect.IsEmpty()) 282 if (visible_geometry_rect.IsEmpty())
304 continue; 283 continue;
305 284
306 append_quads_data->visible_content_area += 285 append_quads_data->visible_content_area +=
307 visible_geometry_rect.width() * visible_geometry_rect.height(); 286 visible_geometry_rect.width() * visible_geometry_rect.height();
308 287
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 on_demand_missing_tile_count); 401 on_demand_missing_tile_count);
423 } 402 }
424 403
425 // Aggressively remove any tilings that are not seen to save memory. Note 404 // Aggressively remove any tilings that are not seen to save memory. Note
426 // that this is at the expense of doing cause more frequent re-painting. A 405 // that this is at the expense of doing cause more frequent re-painting. A
427 // better scheme would be to maintain a tighter visible_content_rect for the 406 // better scheme would be to maintain a tighter visible_content_rect for the
428 // finer tilings. 407 // finer tilings.
429 CleanUpTilingsOnActiveLayer(last_append_quads_tilings_); 408 CleanUpTilingsOnActiveLayer(last_append_quads_tilings_);
430 } 409 }
431 410
432 bool PictureLayerImpl::UpdateTiles(const Occlusion& occlusion_in_content_space, 411 bool PictureLayerImpl::UpdateTiles(bool resourceless_software_draw) {
433 bool resourceless_software_draw) {
434 DCHECK_EQ(1.f, contents_scale_x()); 412 DCHECK_EQ(1.f, contents_scale_x());
435 DCHECK_EQ(1.f, contents_scale_y()); 413 DCHECK_EQ(1.f, contents_scale_y());
436 414
437 if (!resourceless_software_draw) { 415 if (!resourceless_software_draw) {
438 visible_rect_for_tile_priority_ = visible_content_rect(); 416 visible_rect_for_tile_priority_ = visible_content_rect();
439 } 417 }
440 418
441 if (!CanHaveTilings()) { 419 if (!CanHaveTilings()) {
442 ideal_page_scale_ = 0.f; 420 ideal_page_scale_ = 0.f;
443 ideal_device_scale_ = 0.f; 421 ideal_device_scale_ = 0.f;
444 ideal_contents_scale_ = 0.f; 422 ideal_contents_scale_ = 0.f;
445 ideal_source_scale_ = 0.f; 423 ideal_source_scale_ = 0.f;
446 SanityCheckTilingState(); 424 SanityCheckTilingState();
447 return false; 425 return false;
448 } 426 }
449 427
450 // Remove any non-ideal tilings that were not used last time we generated 428 // Remove any non-ideal tilings that were not used last time we generated
451 // quads to save memory and processing time. Note that pending tree should 429 // quads to save memory and processing time. Note that pending tree should
452 // only have one or two tilings (high and low res), so only clean up the 430 // only have one or two tilings (high and low res), so only clean up the
453 // active layer. This cleans it up here in case AppendQuads didn't run. 431 // active layer. This cleans it up here in case AppendQuads didn't run.
454 // If it did run, this would not remove any additional tilings. 432 // If it did run, this would not remove any additional tilings.
455 if (GetTree() == ACTIVE_TREE) 433 if (layer_tree_impl()->IsActiveTree())
456 CleanUpTilingsOnActiveLayer(last_append_quads_tilings_); 434 CleanUpTilingsOnActiveLayer(last_append_quads_tilings_);
457 435
458 UpdateIdealScales(); 436 UpdateIdealScales();
459 437
460 if (!raster_contents_scale_ || ShouldAdjustRasterScale()) { 438 if (!raster_contents_scale_ || ShouldAdjustRasterScale()) {
461 RecalculateRasterScales(); 439 RecalculateRasterScales();
462 AddTilingsForRasterScale(); 440 AddTilingsForRasterScale();
463 } 441 }
464 442
465 DCHECK(raster_page_scale_); 443 DCHECK(raster_page_scale_);
466 DCHECK(raster_device_scale_); 444 DCHECK(raster_device_scale_);
467 DCHECK(raster_source_scale_); 445 DCHECK(raster_source_scale_);
468 DCHECK(raster_contents_scale_); 446 DCHECK(raster_contents_scale_);
469 DCHECK(low_res_raster_contents_scale_); 447 DCHECK(low_res_raster_contents_scale_);
470 448
471 was_screen_space_transform_animating_ = 449 was_screen_space_transform_animating_ =
472 draw_properties().screen_space_transform_is_animating; 450 draw_properties().screen_space_transform_is_animating;
473 451
474 if (draw_transform_is_animating()) 452 if (draw_transform_is_animating())
475 raster_source_->SetShouldAttemptToUseDistanceFieldText(); 453 raster_source_->SetShouldAttemptToUseDistanceFieldText();
476 return UpdateTilePriorities(occlusion_in_content_space);
477 }
478
479 bool PictureLayerImpl::UpdateTilePriorities(
480 const Occlusion& occlusion_in_content_space) {
481 DCHECK_IMPLIES(raster_source_->IsSolidColor(), tilings_->num_tilings() == 0);
482 454
483 double current_frame_time_in_seconds = 455 double current_frame_time_in_seconds =
484 (layer_tree_impl()->CurrentBeginFrameArgs().frame_time - 456 (layer_tree_impl()->CurrentBeginFrameArgs().frame_time -
485 base::TimeTicks()).InSecondsF(); 457 base::TimeTicks()).InSecondsF();
486 UpdateViewportRectForTilePriorityInContentSpace(); 458 UpdateViewportRectForTilePriorityInContentSpace();
487 459
488 // The tiling set can require tiles for activation any of the following 460 // The tiling set can require tiles for activation any of the following
489 // conditions are true: 461 // conditions are true:
490 // - This layer produced a high-res or non-ideal-res tile last frame. 462 // - This layer produced a high-res or non-ideal-res tile last frame.
491 // - We're in requires high res to draw mode. 463 // - We're in requires high res to draw mode.
492 // - We're not in smoothness takes priority mode. 464 // - We're not in smoothness takes priority mode.
493 // To put different, the tiling set can't require tiles for activation if 465 // To put different, the tiling set can't require tiles for activation if
494 // we're in smoothness mode and only used low-res or checkerboard to draw last 466 // we're in smoothness mode and only used low-res or checkerboard to draw last
495 // frame and we don't need high res to draw. 467 // frame and we don't need high res to draw.
496 // 468 //
497 // The reason for this is that we should be able to activate sooner and get a 469 // The reason for this is that we should be able to activate sooner and get a
498 // more up to date recording, so we don't run out of recording on the active 470 // more up to date recording, so we don't run out of recording on the active
499 // tree. 471 // tree.
500 bool can_require_tiles_for_activation = 472 bool can_require_tiles_for_activation =
501 !only_used_low_res_last_append_quads_ || RequiresHighResToDraw() || 473 !only_used_low_res_last_append_quads_ || RequiresHighResToDraw() ||
502 !layer_tree_impl()->SmoothnessTakesPriority(); 474 !layer_tree_impl()->SmoothnessTakesPriority();
503 475
476 static const Occlusion kEmptyOcclusion;
477 const Occlusion& occlusion_in_content_space =
478 layer_tree_impl()->settings().use_occlusion_for_tile_prioritization
479 ? draw_properties().occlusion_in_content_space
480 : kEmptyOcclusion;
481
504 // Pass |occlusion_in_content_space| for |occlusion_in_layer_space| since 482 // Pass |occlusion_in_content_space| for |occlusion_in_layer_space| since
505 // they are the same space in picture layer, as contents scale is always 1. 483 // they are the same space in picture layer, as contents scale is always 1.
506 bool updated = tilings_->UpdateTilePriorities( 484 bool updated = tilings_->UpdateTilePriorities(
507 viewport_rect_for_tile_priority_in_content_space_, ideal_contents_scale_, 485 viewport_rect_for_tile_priority_in_content_space_, ideal_contents_scale_,
508 current_frame_time_in_seconds, occlusion_in_content_space, 486 current_frame_time_in_seconds, occlusion_in_content_space,
509 can_require_tiles_for_activation); 487 can_require_tiles_for_activation);
510 return updated; 488 return updated;
511 } 489 }
512 490
513 void PictureLayerImpl::UpdateViewportRectForTilePriorityInContentSpace() { 491 void PictureLayerImpl::UpdateViewportRectForTilePriorityInContentSpace() {
(...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after
1132 float max_contents_scale = tilings_->GetMaximumContentsScale(); 1110 float max_contents_scale = tilings_->GetMaximumContentsScale();
1133 return std::max(max_contents_scale, MinimumContentsScale()); 1111 return std::max(max_contents_scale, MinimumContentsScale());
1134 } 1112 }
1135 1113
1136 scoped_ptr<PictureLayerTilingSet> 1114 scoped_ptr<PictureLayerTilingSet>
1137 PictureLayerImpl::CreatePictureLayerTilingSet() { 1115 PictureLayerImpl::CreatePictureLayerTilingSet() {
1138 const LayerTreeSettings& settings = layer_tree_impl()->settings(); 1116 const LayerTreeSettings& settings = layer_tree_impl()->settings();
1139 return PictureLayerTilingSet::Create( 1117 return PictureLayerTilingSet::Create(
1140 this, settings.max_tiles_for_interest_area, 1118 this, settings.max_tiles_for_interest_area,
1141 layer_tree_impl()->use_gpu_rasterization() 1119 layer_tree_impl()->use_gpu_rasterization()
1142 ? 0.f 1120 ? settings.gpu_rasterization_skewport_target_time_in_seconds
1143 : settings.skewport_target_time_in_seconds, 1121 : settings.skewport_target_time_in_seconds,
1144 settings.skewport_extrapolation_limit_in_content_pixels); 1122 settings.skewport_extrapolation_limit_in_content_pixels);
1145 } 1123 }
1146 1124
1147 void PictureLayerImpl::UpdateIdealScales() { 1125 void PictureLayerImpl::UpdateIdealScales() {
1148 DCHECK(CanHaveTilings()); 1126 DCHECK(CanHaveTilings());
1149 1127
1150 float min_contents_scale = MinimumContentsScale(); 1128 float min_contents_scale = MinimumContentsScale();
1151 DCHECK_GT(min_contents_scale, 0.f); 1129 DCHECK_GT(min_contents_scale, 0.f);
1152 float min_page_scale = layer_tree_impl()->min_page_scale_factor(); 1130 float min_page_scale = layer_tree_impl()->min_page_scale_factor();
(...skipping 20 matching lines...) Expand all
1173 *width = DebugColors::TiledContentLayerBorderWidth(layer_tree_impl()); 1151 *width = DebugColors::TiledContentLayerBorderWidth(layer_tree_impl());
1174 } 1152 }
1175 1153
1176 void PictureLayerImpl::GetAllTilesForTracing( 1154 void PictureLayerImpl::GetAllTilesForTracing(
1177 std::set<const Tile*>* tiles) const { 1155 std::set<const Tile*>* tiles) const {
1178 if (!tilings_) 1156 if (!tilings_)
1179 return; 1157 return;
1180 tilings_->GetAllTilesForTracing(tiles); 1158 tilings_->GetAllTilesForTracing(tiles);
1181 } 1159 }
1182 1160
1183 void PictureLayerImpl::AsValueInto(base::debug::TracedValue* state) const { 1161 void PictureLayerImpl::AsValueInto(
1162 base::trace_event::TracedValue* state) const {
1184 LayerImpl::AsValueInto(state); 1163 LayerImpl::AsValueInto(state);
1185 state->SetDouble("ideal_contents_scale", ideal_contents_scale_); 1164 state->SetDouble("ideal_contents_scale", ideal_contents_scale_);
1186 state->SetDouble("geometry_contents_scale", MaximumTilingContentsScale()); 1165 state->SetDouble("geometry_contents_scale", MaximumTilingContentsScale());
1187 state->BeginArray("tilings"); 1166 state->BeginArray("tilings");
1188 tilings_->AsValueInto(state); 1167 tilings_->AsValueInto(state);
1189 state->EndArray(); 1168 state->EndArray();
1190 1169
1191 MathUtil::AddToTracedValue("tile_priority_rect", 1170 MathUtil::AddToTracedValue("tile_priority_rect",
1192 viewport_rect_for_tile_priority_in_content_space_, 1171 viewport_rect_for_tile_priority_in_content_space_,
1193 state); 1172 state);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
1232 1211
1233 bool PictureLayerImpl::IsOnActiveOrPendingTree() const { 1212 bool PictureLayerImpl::IsOnActiveOrPendingTree() const {
1234 return !layer_tree_impl()->IsRecycleTree(); 1213 return !layer_tree_impl()->IsRecycleTree();
1235 } 1214 }
1236 1215
1237 bool PictureLayerImpl::HasValidTilePriorities() const { 1216 bool PictureLayerImpl::HasValidTilePriorities() const {
1238 return IsOnActiveOrPendingTree() && IsDrawnRenderSurfaceLayerListMember(); 1217 return IsOnActiveOrPendingTree() && IsDrawnRenderSurfaceLayerListMember();
1239 } 1218 }
1240 1219
1241 } // namespace cc 1220 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/picture_layer_impl.h ('k') | cc/layers/picture_layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698