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

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

Issue 2795703002: ui: Add debug flag to show composited layer borders in ChromeOS UI. (Closed)
Patch Set: nits 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
« no previous file with comments | « cc/layers/render_surface_impl.cc ('k') | chrome/browser/about_flags.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 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/layers/surface_layer_impl.h" 5 #include "cc/layers/surface_layer_impl.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/trace_event/trace_event_argument.h" 9 #include "base/trace_event/trace_event_argument.h"
10 #include "cc/debug/debug_colors.h" 10 #include "cc/debug/debug_colors.h"
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 } 128 }
129 129
130 void SurfaceLayerImpl::GetDebugBorderProperties(SkColor* color, 130 void SurfaceLayerImpl::GetDebugBorderProperties(SkColor* color,
131 float* width) const { 131 float* width) const {
132 *color = DebugColors::SurfaceLayerBorderColor(); 132 *color = DebugColors::SurfaceLayerBorderColor();
133 *width = DebugColors::SurfaceLayerBorderWidth( 133 *width = DebugColors::SurfaceLayerBorderWidth(
134 layer_tree_impl() ? layer_tree_impl()->device_scale_factor() : 1); 134 layer_tree_impl() ? layer_tree_impl()->device_scale_factor() : 1);
135 } 135 }
136 136
137 void SurfaceLayerImpl::AppendRainbowDebugBorder(RenderPass* render_pass) { 137 void SurfaceLayerImpl::AppendRainbowDebugBorder(RenderPass* render_pass) {
138 if (!ShowDebugBorders()) 138 if (!ShowDebugBorders(DebugBorderType::SURFACE))
139 return; 139 return;
140 140
141 SharedQuadState* shared_quad_state = 141 SharedQuadState* shared_quad_state =
142 render_pass->CreateAndAppendSharedQuadState(); 142 render_pass->CreateAndAppendSharedQuadState();
143 PopulateSharedQuadState(shared_quad_state); 143 PopulateSharedQuadState(shared_quad_state);
144 144
145 SkColor color; 145 SkColor color;
146 float border_width; 146 float border_width;
147 GetDebugBorderProperties(&color, &border_width); 147 GetDebugBorderProperties(&color, &border_width);
148 148
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 dict->SetString("surface_id", primary_surface_info_.id().ToString()); 226 dict->SetString("surface_id", primary_surface_info_.id().ToString());
227 dict->SetString("fallback_surface_id", 227 dict->SetString("fallback_surface_id",
228 fallback_surface_info_.id().ToString()); 228 fallback_surface_info_.id().ToString());
229 } 229 }
230 230
231 const char* SurfaceLayerImpl::LayerTypeAsString() const { 231 const char* SurfaceLayerImpl::LayerTypeAsString() const {
232 return "cc::SurfaceLayerImpl"; 232 return "cc::SurfaceLayerImpl";
233 } 233 }
234 234
235 } // namespace cc 235 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/render_surface_impl.cc ('k') | chrome/browser/about_flags.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698