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

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

Issue 1231453002: Compute if a layer is clipped outside CalcDrawProps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: DrawProperties is_clipped removed 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 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 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 if (delegated_quad->shared_quad_state != delegated_shared_quad_state) { 426 if (delegated_quad->shared_quad_state != delegated_shared_quad_state) {
427 delegated_shared_quad_state = delegated_quad->shared_quad_state; 427 delegated_shared_quad_state = delegated_quad->shared_quad_state;
428 output_shared_quad_state = render_pass->CreateAndAppendSharedQuadState(); 428 output_shared_quad_state = render_pass->CreateAndAppendSharedQuadState();
429 output_shared_quad_state->CopyFrom(delegated_shared_quad_state); 429 output_shared_quad_state->CopyFrom(delegated_shared_quad_state);
430 430
431 if (is_root_delegated_render_pass) { 431 if (is_root_delegated_render_pass) {
432 output_shared_quad_state->quad_to_target_transform.ConcatTransform( 432 output_shared_quad_state->quad_to_target_transform.ConcatTransform(
433 delegated_frame_to_target_transform); 433 delegated_frame_to_target_transform);
434 434
435 if (render_target() == this) { 435 if (render_target() == this) {
436 DCHECK(!is_clipped()); 436 DCHECK(!is_clipped_from_property_tree());
437 DCHECK(render_surface()); 437 DCHECK(render_surface());
438 DCHECK_EQ(0u, num_unclipped_descendants()); 438 DCHECK_EQ(0u, num_unclipped_descendants());
439 output_shared_quad_state->clip_rect = 439 output_shared_quad_state->clip_rect =
440 MathUtil::MapEnclosingClippedRect( 440 MathUtil::MapEnclosingClippedRect(
441 delegated_frame_to_target_transform, 441 delegated_frame_to_target_transform,
442 output_shared_quad_state->clip_rect); 442 output_shared_quad_state->clip_rect);
443 } else { 443 } else {
444 gfx::Rect clip_rect = drawable_content_rect(); 444 gfx::Rect clip_rect = drawable_content_rect();
445 if (output_shared_quad_state->is_clipped) { 445 if (output_shared_quad_state->is_clipped) {
446 clip_rect.Intersect(MathUtil::MapEnclosingClippedRect( 446 clip_rect.Intersect(MathUtil::MapEnclosingClippedRect(
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 if (own_child_id_) { 515 if (own_child_id_) {
516 ResourceProvider* provider = layer_tree_impl()->resource_provider(); 516 ResourceProvider* provider = layer_tree_impl()->resource_provider();
517 provider->DestroyChild(child_id_); 517 provider->DestroyChild(child_id_);
518 } 518 }
519 519
520 resources_.clear(); 520 resources_.clear();
521 child_id_ = 0; 521 child_id_ = 0;
522 } 522 }
523 523
524 } // namespace cc 524 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698