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

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

Issue 2795703002: ui: Add debug flag to show composited layer borders in ChromeOS UI. (Closed)
Patch Set: add debug border bitset Created 3 years, 8 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 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 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 int sorting_context_id = 379 int sorting_context_id =
380 property_trees->transform_tree.Node(TransformTreeIndex()) 380 property_trees->transform_tree.Node(TransformTreeIndex())
381 ->sorting_context_id; 381 ->sorting_context_id;
382 SharedQuadState* shared_quad_state = 382 SharedQuadState* shared_quad_state =
383 render_pass->CreateAndAppendSharedQuadState(); 383 render_pass->CreateAndAppendSharedQuadState();
384 shared_quad_state->SetAll( 384 shared_quad_state->SetAll(
385 draw_transform(), content_rect().size(), content_rect(), 385 draw_transform(), content_rect().size(), content_rect(),
386 draw_properties_.clip_rect, draw_properties_.is_clipped, 386 draw_properties_.clip_rect, draw_properties_.is_clipped,
387 draw_properties_.draw_opacity, BlendMode(), sorting_context_id); 387 draw_properties_.draw_opacity, BlendMode(), sorting_context_id);
388 388
389 if (layer_tree_impl_->debug_state().show_debug_borders) { 389 if (layer_tree_impl_->debug_state().show_debug_borders.test(
390 DebugBorderType::RENDERPASS)) {
390 DebugBorderDrawQuad* debug_border_quad = 391 DebugBorderDrawQuad* debug_border_quad =
391 render_pass->CreateAndAppendDrawQuad<DebugBorderDrawQuad>(); 392 render_pass->CreateAndAppendDrawQuad<DebugBorderDrawQuad>();
392 debug_border_quad->SetNew(shared_quad_state, content_rect(), 393 debug_border_quad->SetNew(shared_quad_state, content_rect(),
393 visible_layer_rect, GetDebugBorderColor(), 394 visible_layer_rect, GetDebugBorderColor(),
394 GetDebugBorderWidth()); 395 GetDebugBorderWidth());
395 } 396 }
396 397
397 ResourceId mask_resource_id = 0; 398 ResourceId mask_resource_id = 0;
398 gfx::Size mask_texture_size; 399 gfx::Size mask_texture_size;
399 gfx::Vector2dF mask_uv_scale; 400 gfx::Vector2dF mask_uv_scale;
(...skipping 19 matching lines...) Expand all
419 RenderPassDrawQuad* quad = 420 RenderPassDrawQuad* quad =
420 render_pass->CreateAndAppendDrawQuad<RenderPassDrawQuad>(); 421 render_pass->CreateAndAppendDrawQuad<RenderPassDrawQuad>();
421 quad->SetNew( 422 quad->SetNew(
422 shared_quad_state, content_rect(), visible_layer_rect, GetRenderPassId(), 423 shared_quad_state, content_rect(), visible_layer_rect, GetRenderPassId(),
423 mask_resource_id, gfx::ScaleRect(gfx::RectF(content_rect()), 424 mask_resource_id, gfx::ScaleRect(gfx::RectF(content_rect()),
424 mask_uv_scale.x(), mask_uv_scale.y()), 425 mask_uv_scale.x(), mask_uv_scale.y()),
425 mask_texture_size, surface_contents_scale, FiltersOrigin(), gfx::RectF()); 426 mask_texture_size, surface_contents_scale, FiltersOrigin(), gfx::RectF());
426 } 427 }
427 428
428 } // namespace cc 429 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698