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

Side by Side Diff: cc/surfaces/surface_aggregator.cc

Issue 1172883004: Don't aggregate quads outside of damage rect when using partial swap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@predamage
Patch Set: Created 5 years, 5 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/surfaces/surface_aggregator.h" 5 #include "cc/surfaces/surface_aggregator.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/containers/hash_tables.h" 10 #include "base/containers/hash_tables.h"
(...skipping 23 matching lines...) Expand all
34 DCHECK(it->second); 34 DCHECK(it->second);
35 output_requests->push_back(scoped_ptr<CopyOutputRequest>(it->second)); 35 output_requests->push_back(scoped_ptr<CopyOutputRequest>(it->second));
36 it->second = nullptr; 36 it->second = nullptr;
37 } 37 }
38 copy_requests->erase(request_range.first, request_range.second); 38 copy_requests->erase(request_range.first, request_range.second);
39 } 39 }
40 40
41 } // namespace 41 } // namespace
42 42
43 SurfaceAggregator::SurfaceAggregator(SurfaceManager* manager, 43 SurfaceAggregator::SurfaceAggregator(SurfaceManager* manager,
44 ResourceProvider* provider) 44 ResourceProvider* provider,
45 : manager_(manager), provider_(provider), next_render_pass_id_(1) { 45 bool aggregate_only_damaged)
46 : manager_(manager),
47 provider_(provider),
48 next_render_pass_id_(1),
49 aggregate_only_damaged_(aggregate_only_damaged) {
46 DCHECK(manager_); 50 DCHECK(manager_);
47 } 51 }
48 52
49 SurfaceAggregator::~SurfaceAggregator() {} 53 SurfaceAggregator::~SurfaceAggregator() {}
50 54
51 // Create a clip rect for an aggregated quad from the original clip rect and 55 // Create a clip rect for an aggregated quad from the original clip rect and
52 // the clip rect from the surface it's on. 56 // the clip rect from the surface it's on.
53 SurfaceAggregator::ClipData SurfaceAggregator::CalculateClipRect( 57 SurfaceAggregator::ClipData SurfaceAggregator::CalculateClipRect(
54 const ClipData& surface_clip, 58 const ClipData& surface_clip,
55 const ClipData& quad_clip, 59 const ClipData& quad_clip,
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 const SurfaceDrawQuad* surface_quad, 151 const SurfaceDrawQuad* surface_quad,
148 const gfx::Transform& target_transform, 152 const gfx::Transform& target_transform,
149 const ClipData& clip_rect, 153 const ClipData& clip_rect,
150 RenderPass* dest_pass) { 154 RenderPass* dest_pass) {
151 SurfaceId surface_id = surface_quad->surface_id; 155 SurfaceId surface_id = surface_quad->surface_id;
152 // If this surface's id is already in our referenced set then it creates 156 // If this surface's id is already in our referenced set then it creates
153 // a cycle in the graph and should be dropped. 157 // a cycle in the graph and should be dropped.
154 if (referenced_surfaces_.count(surface_id)) 158 if (referenced_surfaces_.count(surface_id))
155 return; 159 return;
156 Surface* surface = manager_->GetSurfaceForId(surface_id); 160 Surface* surface = manager_->GetSurfaceForId(surface_id);
157 if (!surface) { 161 if (!surface)
158 contained_surfaces_[surface_id] = 0;
159 return; 162 return;
160 }
161 contained_surfaces_[surface_id] = surface->frame_index();
162 const CompositorFrame* frame = surface->GetEligibleFrame(); 163 const CompositorFrame* frame = surface->GetEligibleFrame();
163 if (!frame) 164 if (!frame)
164 return; 165 return;
165 const DelegatedFrameData* frame_data = frame->delegated_frame_data.get(); 166 const DelegatedFrameData* frame_data = frame->delegated_frame_data.get();
166 if (!frame_data) 167 if (!frame_data)
167 return; 168 return;
168 169
169 std::multimap<RenderPassId, CopyOutputRequest*> copy_requests; 170 std::multimap<RenderPassId, CopyOutputRequest*> copy_requests;
170 surface->TakeCopyOutputRequests(&copy_requests); 171 surface->TakeCopyOutputRequests(&copy_requests);
171 172
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 245
245 ClipData quads_clip = 246 ClipData quads_clip =
246 CalculateClipRect(clip_rect, surface_quad_clip_rect, target_transform); 247 CalculateClipRect(clip_rect, surface_quad_clip_rect, target_transform);
247 248
248 CopyQuadsToPass(quads, last_pass.shared_quad_state_list, 249 CopyQuadsToPass(quads, last_pass.shared_quad_state_list,
249 child_to_parent_map, surface_transform, quads_clip, 250 child_to_parent_map, surface_transform, quads_clip,
250 dest_pass, surface_id); 251 dest_pass, surface_id);
251 } else { 252 } else {
252 RenderPassId remapped_pass_id = RemapPassId(last_pass.id, surface_id); 253 RenderPassId remapped_pass_id = RemapPassId(last_pass.id, surface_id);
253 254
254 CopySharedQuadState(surface_quad->shared_quad_state, target_transform, 255 SharedQuadState* shared_quad_state =
255 clip_rect, dest_pass); 256 CopySharedQuadState(surface_quad->shared_quad_state, target_transform,
257 clip_rect, dest_pass);
256 258
257 SharedQuadState* shared_quad_state =
258 dest_pass->shared_quad_state_list.back();
259 RenderPassDrawQuad* quad = 259 RenderPassDrawQuad* quad =
260 dest_pass->CreateAndAppendDrawQuad<RenderPassDrawQuad>(); 260 dest_pass->CreateAndAppendDrawQuad<RenderPassDrawQuad>();
261 quad->SetNew(shared_quad_state, 261 quad->SetNew(shared_quad_state,
262 surface_quad->rect, 262 surface_quad->rect,
263 surface_quad->visible_rect, 263 surface_quad->visible_rect,
264 remapped_pass_id, 264 remapped_pass_id,
265 0, 265 0,
266 gfx::Vector2dF(), 266 gfx::Vector2dF(),
267 gfx::Size(), 267 gfx::Size(),
268 FilterOperations(), 268 FilterOperations(),
269 gfx::Vector2dF(), 269 gfx::Vector2dF(),
270 FilterOperations()); 270 FilterOperations());
271 } 271 }
272 272
273
274 referenced_surfaces_.erase(it); 273 referenced_surfaces_.erase(it);
275 } 274 }
276 275
277 void SurfaceAggregator::CopySharedQuadState( 276 SharedQuadState* SurfaceAggregator::CopySharedQuadState(
278 const SharedQuadState* source_sqs, 277 const SharedQuadState* source_sqs,
279 const gfx::Transform& target_transform, 278 const gfx::Transform& target_transform,
280 const ClipData& clip_rect, 279 const ClipData& clip_rect,
281 RenderPass* dest_render_pass) { 280 RenderPass* dest_render_pass) {
282 SharedQuadState* copy_shared_quad_state = 281 SharedQuadState* copy_shared_quad_state =
283 dest_render_pass->CreateAndAppendSharedQuadState(); 282 dest_render_pass->CreateAndAppendSharedQuadState();
284 copy_shared_quad_state->CopyFrom(source_sqs); 283 copy_shared_quad_state->CopyFrom(source_sqs);
285 // target_transform contains any transformation that may exist 284 // target_transform contains any transformation that may exist
286 // between the context that these quads are being copied from (i.e. the 285 // between the context that these quads are being copied from (i.e. the
287 // surface's draw transform when aggregated from within a surface) to the 286 // surface's draw transform when aggregated from within a surface) to the
288 // target space of the pass. This will be identity except when copying the 287 // target space of the pass. This will be identity except when copying the
289 // root draw pass from a surface into a pass when the surface draw quad's 288 // root draw pass from a surface into a pass when the surface draw quad's
290 // transform is not identity. 289 // transform is not identity.
291 copy_shared_quad_state->quad_to_target_transform.ConcatTransform( 290 copy_shared_quad_state->quad_to_target_transform.ConcatTransform(
292 target_transform); 291 target_transform);
293 292
294 ClipData new_clip_rect = CalculateClipRect( 293 ClipData new_clip_rect = CalculateClipRect(
295 clip_rect, ClipData(source_sqs->is_clipped, source_sqs->clip_rect), 294 clip_rect, ClipData(source_sqs->is_clipped, source_sqs->clip_rect),
296 target_transform); 295 target_transform);
297 copy_shared_quad_state->is_clipped = new_clip_rect.is_clipped; 296 copy_shared_quad_state->is_clipped = new_clip_rect.is_clipped;
298 copy_shared_quad_state->clip_rect = new_clip_rect.rect; 297 copy_shared_quad_state->clip_rect = new_clip_rect.rect;
298 return copy_shared_quad_state;
299 }
300
301 static bool CalculateQuadSpaceDamageRect(
302 const gfx::Transform& quad_to_target_transform,
303 const gfx::Transform& target_to_root_transform,
304 const gfx::Rect& root_damage_rect,
305 gfx::Rect* quad_damage_rect) {
306 gfx::Transform quad_to_root_transform(quad_to_target_transform,
307 target_to_root_transform);
308 gfx::Transform inverse_transform(gfx::Transform::kSkipInitialization);
309 if (!quad_to_root_transform.GetInverse(&inverse_transform))
danakj 2015/07/07 20:53:53 i don't think compositor is supposed to produce no
310 return false;
311
312 *quad_damage_rect = MathUtil::ProjectEnclosingClippedRect(inverse_transform,
313 root_damage_rect);
314 return true;
299 } 315 }
300 316
301 void SurfaceAggregator::CopyQuadsToPass( 317 void SurfaceAggregator::CopyQuadsToPass(
302 const QuadList& source_quad_list, 318 const QuadList& source_quad_list,
303 const SharedQuadStateList& source_shared_quad_state_list, 319 const SharedQuadStateList& source_shared_quad_state_list,
304 const ResourceProvider::ResourceIdMap& child_to_parent_map, 320 const ResourceProvider::ResourceIdMap& child_to_parent_map,
305 const gfx::Transform& target_transform, 321 const gfx::Transform& target_transform,
306 const ClipData& clip_rect, 322 const ClipData& clip_rect,
307 RenderPass* dest_pass, 323 RenderPass* dest_pass,
308 SurfaceId surface_id) { 324 SurfaceId surface_id) {
309 const SharedQuadState* last_copied_source_shared_quad_state = NULL; 325 const SharedQuadState* last_copied_source_shared_quad_state = NULL;
326 const SharedQuadState* dest_shared_quad_state = nullptr;
327 // Damage rect in the quad space of the current shared quad state, if
328 // the transform from that is invertible.
329 // TODO(jbauman): This rect may contain unnecessary area if
330 // transform isn't axis-aligned.
331 gfx::Rect damage_rect_in_quad_space;
332 bool valid_damage_rect = false;
310 333
311 SharedQuadStateList::ConstIterator sqs_iter = 334 SharedQuadStateList::ConstIterator sqs_iter =
312 source_shared_quad_state_list.begin(); 335 source_shared_quad_state_list.begin();
313 for (const auto& quad : source_quad_list) { 336 for (const auto& quad : source_quad_list) {
314 while (quad->shared_quad_state != *sqs_iter) { 337 while (quad->shared_quad_state != *sqs_iter) {
315 ++sqs_iter; 338 ++sqs_iter;
316 DCHECK(sqs_iter != source_shared_quad_state_list.end()); 339 DCHECK(sqs_iter != source_shared_quad_state_list.end());
317 } 340 }
318 DCHECK_EQ(quad->shared_quad_state, *sqs_iter); 341 DCHECK_EQ(quad->shared_quad_state, *sqs_iter);
319 342
320 if (quad->material == DrawQuad::SURFACE_CONTENT) { 343 if (quad->material == DrawQuad::SURFACE_CONTENT) {
321 const SurfaceDrawQuad* surface_quad = SurfaceDrawQuad::MaterialCast(quad); 344 const SurfaceDrawQuad* surface_quad = SurfaceDrawQuad::MaterialCast(quad);
345
346 if (aggregate_only_damaged_ && !has_copy_requests_) {
danakj 2015/07/07 20:53:53 can you comment why you're checking has copy reque
347 gfx::Transform quad_to_target_transform(
348 quad->shared_quad_state->quad_to_target_transform,
349 target_transform);
350 valid_damage_rect = CalculateQuadSpaceDamageRect(
351 quad_to_target_transform, dest_pass->transform_to_root_target,
352 root_damage_rect_, &damage_rect_in_quad_space);
danakj 2015/07/07 20:53:53 you're overwriting the damage_rect_in_quad_space,
353 if (valid_damage_rect &&
354 !damage_rect_in_quad_space.Intersects(quad->visible_rect))
355 continue;
356 }
357
322 HandleSurfaceQuad(surface_quad, target_transform, clip_rect, dest_pass); 358 HandleSurfaceQuad(surface_quad, target_transform, clip_rect, dest_pass);
323 } else { 359 } else {
324 if (quad->shared_quad_state != last_copied_source_shared_quad_state) { 360 if (quad->shared_quad_state != last_copied_source_shared_quad_state) {
325 CopySharedQuadState(quad->shared_quad_state, target_transform, 361 dest_shared_quad_state = CopySharedQuadState(
326 clip_rect, dest_pass); 362 quad->shared_quad_state, target_transform, clip_rect, dest_pass);
327 last_copied_source_shared_quad_state = quad->shared_quad_state; 363 last_copied_source_shared_quad_state = quad->shared_quad_state;
364 if (aggregate_only_damaged_ && !has_copy_requests_) {
365 valid_damage_rect = CalculateQuadSpaceDamageRect(
366 dest_shared_quad_state->quad_to_target_transform,
367 dest_pass->transform_to_root_target, root_damage_rect_,
368 &damage_rect_in_quad_space);
369 }
328 } 370 }
371
372 if (aggregate_only_damaged_ && !has_copy_requests_) {
373 if (valid_damage_rect &&
374 !damage_rect_in_quad_space.Intersects(quad->visible_rect))
375 continue;
376 }
377
329 DrawQuad* dest_quad; 378 DrawQuad* dest_quad;
330 if (quad->material == DrawQuad::RENDER_PASS) { 379 if (quad->material == DrawQuad::RENDER_PASS) {
331 const RenderPassDrawQuad* pass_quad = 380 const RenderPassDrawQuad* pass_quad =
332 RenderPassDrawQuad::MaterialCast(quad); 381 RenderPassDrawQuad::MaterialCast(quad);
333 RenderPassId original_pass_id = pass_quad->render_pass_id; 382 RenderPassId original_pass_id = pass_quad->render_pass_id;
334 RenderPassId remapped_pass_id = 383 RenderPassId remapped_pass_id =
335 RemapPassId(original_pass_id, surface_id); 384 RemapPassId(original_pass_id, surface_id);
336 385
337 dest_quad = dest_pass->CopyFromAndAppendRenderPassDrawQuad( 386 dest_quad = dest_pass->CopyFromAndAppendRenderPassDrawQuad(
338 pass_quad, dest_pass->shared_quad_state_list.back(), 387 pass_quad, dest_shared_quad_state, remapped_pass_id);
339 remapped_pass_id);
340 } else { 388 } else {
341 dest_quad = dest_pass->CopyFromAndAppendDrawQuad( 389 dest_quad =
342 quad, dest_pass->shared_quad_state_list.back()); 390 dest_pass->CopyFromAndAppendDrawQuad(quad, dest_shared_quad_state);
343 } 391 }
344 if (!child_to_parent_map.empty()) { 392 if (!child_to_parent_map.empty()) {
345 for (ResourceId& resource_id : dest_quad->resources) { 393 for (ResourceId& resource_id : dest_quad->resources) {
346 ResourceProvider::ResourceIdMap::const_iterator it = 394 ResourceProvider::ResourceIdMap::const_iterator it =
347 child_to_parent_map.find(resource_id); 395 child_to_parent_map.find(resource_id);
348 DCHECK(it != child_to_parent_map.end()); 396 DCHECK(it != child_to_parent_map.end());
349 397
350 DCHECK_EQ(it->first, resource_id); 398 DCHECK_EQ(it->first, resource_id);
351 ResourceId remapped_id = it->second; 399 ResourceId remapped_id = it->second;
352 resource_id = remapped_id; 400 resource_id = remapped_id;
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 } 457 }
410 458
411 Surface* surface_ptr = manager_->GetSurfaceForId(surface.first); 459 Surface* surface_ptr = manager_->GetSurfaceForId(surface.first);
412 if (surface_ptr) 460 if (surface_ptr)
413 surface_ptr->RunDrawCallbacks(SurfaceDrawStatus::DRAW_SKIPPED); 461 surface_ptr->RunDrawCallbacks(SurfaceDrawStatus::DRAW_SKIPPED);
414 } 462 }
415 } 463 }
416 } 464 }
417 465
418 // Validate the resources of the current surface and its descendants, and 466 // Validate the resources of the current surface and its descendants, and
419 // calculate their combined damage rect. 467 // calculate their combined damage rect.
danakj 2015/07/07 20:53:52 and determine if they have copy requests? at some
420 gfx::Rect SurfaceAggregator::ValidateAndCalculateDamageRect( 468 gfx::Rect SurfaceAggregator::ValidateAndCalculateDamageRect(
421 SurfaceId surface_id) { 469 SurfaceId surface_id) {
422 if (referenced_surfaces_.count(surface_id)) 470 if (referenced_surfaces_.count(surface_id))
423 return gfx::Rect(); 471 return gfx::Rect();
424 Surface* surface = manager_->GetSurfaceForId(surface_id); 472 Surface* surface = manager_->GetSurfaceForId(surface_id);
425 if (!surface) 473 if (!surface) {
474 contained_surfaces_[surface_id] = 0;
426 return gfx::Rect(); 475 return gfx::Rect();
476 }
477 contained_surfaces_[surface_id] = surface->frame_index();
427 const CompositorFrame* surface_frame = surface->GetEligibleFrame(); 478 const CompositorFrame* surface_frame = surface->GetEligibleFrame();
428 if (!surface_frame) 479 if (!surface_frame)
429 return gfx::Rect(); 480 return gfx::Rect();
430 const DelegatedFrameData* frame_data = 481 const DelegatedFrameData* frame_data =
431 surface_frame->delegated_frame_data.get(); 482 surface_frame->delegated_frame_data.get();
432 if (!frame_data) 483 if (!frame_data)
433 return gfx::Rect(); 484 return gfx::Rect();
434 int child_id = 0; 485 int child_id = 0;
435 // TODO(jbauman): hack for unit tests that don't set up rp 486 // TODO(jbauman): hack for unit tests that don't set up rp
436 if (provider_) { 487 if (provider_) {
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 } 536 }
486 } 537 }
487 538
488 if (invalid_frame) 539 if (invalid_frame)
489 return gfx::Rect(); 540 return gfx::Rect();
490 valid_surfaces_.insert(surface->surface_id()); 541 valid_surfaces_.insert(surface->surface_id());
491 542
492 if (provider_) 543 if (provider_)
493 provider_->DeclareUsedResourcesFromChild(child_id, referenced_resources); 544 provider_->DeclareUsedResourcesFromChild(child_id, referenced_resources);
494 545
546 for (const auto& render_pass : frame_data->render_pass_list)
547 has_copy_requests_ |= !render_pass->copy_requests.empty();
548
495 gfx::Rect damage_rect; 549 gfx::Rect damage_rect;
496 if (!frame_data->render_pass_list.empty()) { 550 if (!frame_data->render_pass_list.empty()) {
551 RenderPass* last_pass = frame_data->render_pass_list.back();
497 damage_rect = 552 damage_rect =
498 DamageRectForSurface(surface, *frame_data->render_pass_list.back(), 553 DamageRectForSurface(surface, *last_pass, last_pass->output_rect);
499 frame_data->render_pass_list.back()->output_rect);
500 } 554 }
501 555
502 // Avoid infinite recursion by adding current surface to 556 // Avoid infinite recursion by adding current surface to
503 // referenced_surfaces_. 557 // referenced_surfaces_.
504 SurfaceSet::iterator it = 558 SurfaceSet::iterator it =
505 referenced_surfaces_.insert(surface->surface_id()).first; 559 referenced_surfaces_.insert(surface->surface_id()).first;
506 for (const auto& surface_info : child_surfaces) { 560 for (const auto& surface_info : child_surfaces) {
507 gfx::Rect surface_damage = 561 gfx::Rect surface_damage =
508 ValidateAndCalculateDamageRect(surface_info.first); 562 ValidateAndCalculateDamageRect(surface_info.first);
509 damage_rect.Union( 563 damage_rect.Union(
(...skipping 14 matching lines...) Expand all
524 578
525 scoped_ptr<CompositorFrame> frame(new CompositorFrame); 579 scoped_ptr<CompositorFrame> frame(new CompositorFrame);
526 frame->delegated_frame_data = make_scoped_ptr(new DelegatedFrameData); 580 frame->delegated_frame_data = make_scoped_ptr(new DelegatedFrameData);
527 581
528 DCHECK(root_surface_frame->delegated_frame_data); 582 DCHECK(root_surface_frame->delegated_frame_data);
529 583
530 dest_resource_list_ = &frame->delegated_frame_data->resource_list; 584 dest_resource_list_ = &frame->delegated_frame_data->resource_list;
531 dest_pass_list_ = &frame->delegated_frame_data->render_pass_list; 585 dest_pass_list_ = &frame->delegated_frame_data->render_pass_list;
532 586
533 valid_surfaces_.clear(); 587 valid_surfaces_.clear();
534 gfx::Rect damage_rect = ValidateAndCalculateDamageRect(surface_id); 588 has_copy_requests_ = false;
danakj 2015/07/07 20:53:53 Do these need to be member variables? Can they be
589 root_damage_rect_ = ValidateAndCalculateDamageRect(surface_id);
535 590
536 SurfaceSet::iterator it = referenced_surfaces_.insert(surface_id).first; 591 SurfaceSet::iterator it = referenced_surfaces_.insert(surface_id).first;
537 CopyPasses(root_surface_frame->delegated_frame_data.get(), surface); 592 CopyPasses(root_surface_frame->delegated_frame_data.get(), surface);
538 referenced_surfaces_.erase(it); 593 referenced_surfaces_.erase(it);
539 594
540 DCHECK(referenced_surfaces_.empty()); 595 DCHECK(referenced_surfaces_.empty());
541 596
542 if (dest_pass_list_->empty()) 597 if (dest_pass_list_->empty())
543 return nullptr; 598 return nullptr;
544 dest_pass_list_->back()->damage_rect = damage_rect; 599 dest_pass_list_->back()->damage_rect = root_damage_rect_;
545 600
546 dest_pass_list_ = NULL; 601 dest_pass_list_ = NULL;
547 RemoveUnreferencedChildren(); 602 RemoveUnreferencedChildren();
548 contained_surfaces_.swap(previous_contained_surfaces_); 603 contained_surfaces_.swap(previous_contained_surfaces_);
549 contained_surfaces_.clear(); 604 contained_surfaces_.clear();
550 605
551 for (SurfaceIndexMap::iterator it = previous_contained_surfaces_.begin(); 606 for (SurfaceIndexMap::iterator it = previous_contained_surfaces_.begin();
552 it != previous_contained_surfaces_.end(); 607 it != previous_contained_surfaces_.end();
553 ++it) { 608 ++it) {
554 Surface* surface = manager_->GetSurfaceForId(it->first); 609 Surface* surface = manager_->GetSurfaceForId(it->first);
(...skipping 18 matching lines...) Expand all
573 628
574 void SurfaceAggregator::SetFullDamageForSurface(SurfaceId surface_id) { 629 void SurfaceAggregator::SetFullDamageForSurface(SurfaceId surface_id) {
575 auto it = previous_contained_surfaces_.find(surface_id); 630 auto it = previous_contained_surfaces_.find(surface_id);
576 if (it == previous_contained_surfaces_.end()) 631 if (it == previous_contained_surfaces_.end())
577 return; 632 return;
578 // Set the last drawn index as 0 to ensure full damage next time it's drawn. 633 // Set the last drawn index as 0 to ensure full damage next time it's drawn.
579 it->second = 0; 634 it->second = 0;
580 } 635 }
581 636
582 } // namespace cc 637 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698