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

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

Issue 341023003: cc: Pass scaled bounds to debug border quads for drawing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: avoid extra overload function Created 6 years, 6 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/tiled_layer_impl.cc ('k') | cc/layers/video_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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/ui_resource_layer_impl.h" 5 #include "cc/layers/ui_resource_layer_impl.h"
6 6
7 #include "base/strings/stringprintf.h" 7 #include "base/strings/stringprintf.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "cc/base/math_util.h" 9 #include "cc/base/math_util.h"
10 #include "cc/layers/quad_sink.h" 10 #include "cc/layers/quad_sink.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 if (!ui_resource_id_ || draw_mode == DRAW_MODE_RESOURCELESS_SOFTWARE) 89 if (!ui_resource_id_ || draw_mode == DRAW_MODE_RESOURCELESS_SOFTWARE)
90 return false; 90 return false;
91 return LayerImpl::WillDraw(draw_mode, resource_provider); 91 return LayerImpl::WillDraw(draw_mode, resource_provider);
92 } 92 }
93 93
94 void UIResourceLayerImpl::AppendQuads(QuadSink* quad_sink, 94 void UIResourceLayerImpl::AppendQuads(QuadSink* quad_sink,
95 AppendQuadsData* append_quads_data) { 95 AppendQuadsData* append_quads_data) {
96 SharedQuadState* shared_quad_state = quad_sink->CreateSharedQuadState(); 96 SharedQuadState* shared_quad_state = quad_sink->CreateSharedQuadState();
97 PopulateSharedQuadState(shared_quad_state); 97 PopulateSharedQuadState(shared_quad_state);
98 98
99 AppendDebugBorderQuad(quad_sink, shared_quad_state, append_quads_data); 99 AppendDebugBorderQuad(
100 quad_sink, content_bounds(), shared_quad_state, append_quads_data);
100 101
101 if (!ui_resource_id_) 102 if (!ui_resource_id_)
102 return; 103 return;
103 104
104 ResourceProvider::ResourceId resource = 105 ResourceProvider::ResourceId resource =
105 layer_tree_impl()->ResourceIdForUIResource(ui_resource_id_); 106 layer_tree_impl()->ResourceIdForUIResource(ui_resource_id_);
106 107
107 if (!resource) 108 if (!resource)
108 return; 109 return;
109 110
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 list->AppendDouble(vertex_opacity_[3]); 154 list->AppendDouble(vertex_opacity_[3]);
154 result->Set("VertexOpacity", list); 155 result->Set("VertexOpacity", list);
155 156
156 result->Set("UVTopLeft", MathUtil::AsValue(uv_top_left_).release()); 157 result->Set("UVTopLeft", MathUtil::AsValue(uv_top_left_).release());
157 result->Set("UVBottomRight", MathUtil::AsValue(uv_bottom_right_).release()); 158 result->Set("UVBottomRight", MathUtil::AsValue(uv_bottom_right_).release());
158 159
159 return result; 160 return result;
160 } 161 }
161 162
162 } // namespace cc 163 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/tiled_layer_impl.cc ('k') | cc/layers/video_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698