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

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

Issue 576173003: cc: Move UnoccludedContentRect to Occlusion. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « no previous file | cc/layers/io_surface_layer_impl.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/delegated_renderer_layer_impl.h" 5 #include "cc/layers/delegated_renderer_layer_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 DCHECK(output_shared_quad_state); 437 DCHECK(output_shared_quad_state);
438 438
439 gfx::Transform quad_content_to_delegated_target_space = 439 gfx::Transform quad_content_to_delegated_target_space =
440 output_shared_quad_state->content_to_target_transform; 440 output_shared_quad_state->content_to_target_transform;
441 if (!is_root_delegated_render_pass) { 441 if (!is_root_delegated_render_pass) {
442 quad_content_to_delegated_target_space.ConcatTransform( 442 quad_content_to_delegated_target_space.ConcatTransform(
443 render_pass->transform_to_root_target); 443 render_pass->transform_to_root_target);
444 quad_content_to_delegated_target_space.ConcatTransform(draw_transform()); 444 quad_content_to_delegated_target_space.ConcatTransform(draw_transform());
445 } 445 }
446 446
447 gfx::Rect quad_visible_rect = occlusion_tracker.UnoccludedContentRect( 447 gfx::Rect quad_visible_rect =
448 delegated_quad->visible_rect, quad_content_to_delegated_target_space); 448 occlusion_tracker.GetCurrentOcclusionForLayer(
danakj 2014/09/18 01:48:45 Are you going to pass the Occlusion instead of the
vmpstr 2014/09/18 21:45:19 Yeah, I wanna do it separately so if the world exp
449 quad_content_to_delegated_target_space)
450 .GetUnoccludedContentRect(delegated_quad->visible_rect);
449 451
450 if (quad_visible_rect.IsEmpty()) 452 if (quad_visible_rect.IsEmpty())
451 continue; 453 continue;
452 454
453 if (delegated_quad->material != DrawQuad::RENDER_PASS) { 455 if (delegated_quad->material != DrawQuad::RENDER_PASS) {
454 DrawQuad* output_quad = render_pass->CopyFromAndAppendDrawQuad( 456 DrawQuad* output_quad = render_pass->CopyFromAndAppendDrawQuad(
455 delegated_quad, output_shared_quad_state); 457 delegated_quad, output_shared_quad_state);
456 output_quad->visible_rect = quad_visible_rect; 458 output_quad->visible_rect = quad_visible_rect;
457 } else { 459 } else {
458 RenderPassId delegated_contributing_render_pass_id = 460 RenderPassId delegated_contributing_render_pass_id =
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 if (own_child_id_) { 493 if (own_child_id_) {
492 ResourceProvider* provider = layer_tree_impl()->resource_provider(); 494 ResourceProvider* provider = layer_tree_impl()->resource_provider();
493 provider->DestroyChild(child_id_); 495 provider->DestroyChild(child_id_);
494 } 496 }
495 497
496 resources_.clear(); 498 resources_.clear();
497 child_id_ = 0; 499 child_id_ = 0;
498 } 500 }
499 501
500 } // namespace cc 502 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/layers/io_surface_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698