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

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

Issue 2053193002: cc : Move LayerImpl::children to test properties (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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/quads/texture_draw_quad.h" 10 #include "cc/quads/texture_draw_quad.h"
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 vertex_opacity, flipped, nearest_neighbor_, false); 343 vertex_opacity, flipped, nearest_neighbor_, false);
344 ValidateQuadResources(quad); 344 ValidateQuadResources(quad);
345 } 345 }
346 } 346 }
347 } 347 }
348 348
349 const char* NinePatchLayerImpl::LayerTypeAsString() const { 349 const char* NinePatchLayerImpl::LayerTypeAsString() const {
350 return "cc::NinePatchLayerImpl"; 350 return "cc::NinePatchLayerImpl";
351 } 351 }
352 352
353 std::unique_ptr<base::DictionaryValue> NinePatchLayerImpl::LayerTreeAsJson() 353 std::unique_ptr<base::DictionaryValue> NinePatchLayerImpl::LayerTreeAsJson() {
354 const {
355 std::unique_ptr<base::DictionaryValue> result = LayerImpl::LayerTreeAsJson(); 354 std::unique_ptr<base::DictionaryValue> result = LayerImpl::LayerTreeAsJson();
356 355
357 base::ListValue* list = new base::ListValue; 356 base::ListValue* list = new base::ListValue;
358 list->AppendInteger(image_aperture_.origin().x()); 357 list->AppendInteger(image_aperture_.origin().x());
359 list->AppendInteger(image_aperture_.origin().y()); 358 list->AppendInteger(image_aperture_.origin().y());
360 list->AppendInteger(image_aperture_.size().width()); 359 list->AppendInteger(image_aperture_.size().width());
361 list->AppendInteger(image_aperture_.size().height()); 360 list->AppendInteger(image_aperture_.size().height());
362 result->Set("ImageAperture", list); 361 result->Set("ImageAperture", list);
363 362
364 list = new base::ListValue; 363 list = new base::ListValue;
365 list->AppendInteger(image_bounds_.width()); 364 list->AppendInteger(image_bounds_.width());
366 list->AppendInteger(image_bounds_.height()); 365 list->AppendInteger(image_bounds_.height());
367 result->Set("ImageBounds", list); 366 result->Set("ImageBounds", list);
368 367
369 result->Set("Border", MathUtil::AsValue(border_).release()); 368 result->Set("Border", MathUtil::AsValue(border_).release());
370 369
371 result->SetBoolean("FillCenter", fill_center_); 370 result->SetBoolean("FillCenter", fill_center_);
372 371
373 return result; 372 return result;
374 } 373 }
375 374
376 } // namespace cc 375 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698