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

Side by Side Diff: cc/layers/nine_patch_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/layer_impl.cc ('k') | cc/layers/painted_scrollbar_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 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/nine_patch_layer_impl.h" 5 #include "cc/layers/nine_patch_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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 << "image_bounds_ " << gfx::Rect(image_bounds_).ToString() 79 << "image_bounds_ " << gfx::Rect(image_bounds_).ToString()
80 << " image_aperture_ " << image_aperture_.ToString(); 80 << " image_aperture_ " << image_aperture_.ToString();
81 } 81 }
82 82
83 void NinePatchLayerImpl::AppendQuads(QuadSink* quad_sink, 83 void NinePatchLayerImpl::AppendQuads(QuadSink* quad_sink,
84 AppendQuadsData* append_quads_data) { 84 AppendQuadsData* append_quads_data) {
85 CheckGeometryLimitations(); 85 CheckGeometryLimitations();
86 SharedQuadState* shared_quad_state = quad_sink->CreateSharedQuadState(); 86 SharedQuadState* shared_quad_state = quad_sink->CreateSharedQuadState();
87 PopulateSharedQuadState(shared_quad_state); 87 PopulateSharedQuadState(shared_quad_state);
88 88
89 AppendDebugBorderQuad(quad_sink, shared_quad_state, append_quads_data); 89 AppendDebugBorderQuad(
90 quad_sink, content_bounds(), shared_quad_state, append_quads_data);
90 91
91 if (!ui_resource_id_) 92 if (!ui_resource_id_)
92 return; 93 return;
93 94
94 ResourceProvider::ResourceId resource = 95 ResourceProvider::ResourceId resource =
95 layer_tree_impl()->ResourceIdForUIResource(ui_resource_id_); 96 layer_tree_impl()->ResourceIdForUIResource(ui_resource_id_);
96 97
97 if (!resource) 98 if (!resource)
98 return; 99 return;
99 100
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 result->Set("Border", MathUtil::AsValue(border_).release()); 396 result->Set("Border", MathUtil::AsValue(border_).release());
396 397
397 base::FundamentalValue* fill_center = 398 base::FundamentalValue* fill_center =
398 base::Value::CreateBooleanValue(fill_center_); 399 base::Value::CreateBooleanValue(fill_center_);
399 result->Set("FillCenter", fill_center); 400 result->Set("FillCenter", fill_center);
400 401
401 return result; 402 return result;
402 } 403 }
403 404
404 } // namespace cc 405 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer_impl.cc ('k') | cc/layers/painted_scrollbar_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698