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

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

Issue 2446113006: cc: Use transform node's sorting_context_id in RenderSurfaceImpl (Closed)
Patch Set: Created 4 years, 1 month 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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/render_surface_impl.h" 5 #include "cc/layers/render_surface_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 SkColor debug_border_color, 354 SkColor debug_border_color,
355 float debug_border_width, 355 float debug_border_width,
356 LayerImpl* mask_layer, 356 LayerImpl* mask_layer,
357 AppendQuadsData* append_quads_data, 357 AppendQuadsData* append_quads_data,
358 RenderPassId render_pass_id) { 358 RenderPassId render_pass_id) {
359 gfx::Rect visible_layer_rect = 359 gfx::Rect visible_layer_rect =
360 occlusion_in_content_space.GetUnoccludedContentRect(content_rect()); 360 occlusion_in_content_space.GetUnoccludedContentRect(content_rect());
361 if (visible_layer_rect.IsEmpty()) 361 if (visible_layer_rect.IsEmpty())
362 return; 362 return;
363 363
364 const PropertyTrees* property_trees =
365 owning_layer_->layer_tree_impl()->property_trees();
366 int sorting_context_id =
367 property_trees->transform_tree.Node(TransformTreeIndex())
368 ->sorting_context_id;
364 SharedQuadState* shared_quad_state = 369 SharedQuadState* shared_quad_state =
365 render_pass->CreateAndAppendSharedQuadState(); 370 render_pass->CreateAndAppendSharedQuadState();
366 shared_quad_state->SetAll(draw_transform, content_rect().size(), 371 shared_quad_state->SetAll(
367 content_rect(), draw_properties_.clip_rect, 372 draw_transform, content_rect().size(), content_rect(),
368 draw_properties_.is_clipped, 373 draw_properties_.clip_rect, draw_properties_.is_clipped,
369 draw_properties_.draw_opacity, BlendMode(), 374 draw_properties_.draw_opacity, BlendMode(), sorting_context_id);
370 owning_layer_->sorting_context_id());
371 375
372 if (owning_layer_->ShowDebugBorders()) { 376 if (owning_layer_->ShowDebugBorders()) {
373 DebugBorderDrawQuad* debug_border_quad = 377 DebugBorderDrawQuad* debug_border_quad =
374 render_pass->CreateAndAppendDrawQuad<DebugBorderDrawQuad>(); 378 render_pass->CreateAndAppendDrawQuad<DebugBorderDrawQuad>();
375 debug_border_quad->SetNew(shared_quad_state, content_rect(), 379 debug_border_quad->SetNew(shared_quad_state, content_rect(),
376 visible_layer_rect, debug_border_color, 380 visible_layer_rect, debug_border_color,
377 debug_border_width); 381 debug_border_width);
378 } 382 }
379 383
380 ResourceId mask_resource_id = 0; 384 ResourceId mask_resource_id = 0;
(...skipping 19 matching lines...) Expand all
400 404
401 RenderPassDrawQuad* quad = 405 RenderPassDrawQuad* quad =
402 render_pass->CreateAndAppendDrawQuad<RenderPassDrawQuad>(); 406 render_pass->CreateAndAppendDrawQuad<RenderPassDrawQuad>();
403 quad->SetNew(shared_quad_state, content_rect(), visible_layer_rect, 407 quad->SetNew(shared_quad_state, content_rect(), visible_layer_rect,
404 render_pass_id, mask_resource_id, mask_uv_scale, 408 render_pass_id, mask_resource_id, mask_uv_scale,
405 mask_texture_size, Filters(), owning_layer_to_target_scale, 409 mask_texture_size, Filters(), owning_layer_to_target_scale,
406 FiltersOrigin(), BackgroundFilters()); 410 FiltersOrigin(), BackgroundFilters());
407 } 411 }
408 412
409 } // namespace cc 413 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698