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

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

Issue 305063002: Added perftests for layer sorting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « no previous file | cc/test/data/layer_sort_cubes.json » ('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/layer_impl.h" 5 #include "cc/layers/layer_impl.h"
6 6
7 #include "base/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "base/json/json_reader.h" 8 #include "base/json/json_reader.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "cc/animation/animation_registrar.h" 10 #include "cc/animation/animation_registrar.h"
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after
631 631
632 const gfx::Transform& gfx_transform = draw_properties_.target_space_transform; 632 const gfx::Transform& gfx_transform = draw_properties_.target_space_transform;
633 double transform[16]; 633 double transform[16];
634 gfx_transform.matrix().asColMajord(transform); 634 gfx_transform.matrix().asColMajord(transform);
635 list = new base::ListValue; 635 list = new base::ListValue;
636 for (int i = 0; i < 16; ++i) 636 for (int i = 0; i < 16; ++i)
637 list->AppendDouble(transform[i]); 637 list->AppendDouble(transform[i]);
638 result->Set("DrawTransform", list); 638 result->Set("DrawTransform", list);
639 639
640 result->SetBoolean("DrawsContent", draws_content_); 640 result->SetBoolean("DrawsContent", draws_content_);
641 result->SetBoolean("Is3DSorted", is_3d_sorted_);
641 result->SetDouble("Opacity", opacity()); 642 result->SetDouble("Opacity", opacity());
642 result->SetBoolean("ContentsOpaque", contents_opaque_); 643 result->SetBoolean("ContentsOpaque", contents_opaque_);
643 644
644 if (scrollable()) 645 if (scrollable())
645 result->SetBoolean("Scrollable", true); 646 result->SetBoolean("Scrollable", true);
646 647
647 if (have_wheel_event_handlers_) 648 if (have_wheel_event_handlers_)
648 result->SetBoolean("WheelHandler", have_wheel_event_handlers_); 649 result->SetBoolean("WheelHandler", have_wheel_event_handlers_);
649 if (have_scroll_event_handlers_) 650 if (have_scroll_event_handlers_)
650 result->SetBoolean("ScrollHandler", have_scroll_event_handlers_); 651 result->SetBoolean("ScrollHandler", have_scroll_event_handlers_);
(...skipping 859 matching lines...) Expand 10 before | Expand all | Expand 10 after
1510 scoped_ptr<base::Value> LayerImpl::AsValue() const { 1511 scoped_ptr<base::Value> LayerImpl::AsValue() const {
1511 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue()); 1512 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue());
1512 AsValueInto(state.get()); 1513 AsValueInto(state.get());
1513 return state.PassAs<base::Value>(); 1514 return state.PassAs<base::Value>();
1514 } 1515 }
1515 1516
1516 void LayerImpl::RunMicroBenchmark(MicroBenchmarkImpl* benchmark) { 1517 void LayerImpl::RunMicroBenchmark(MicroBenchmarkImpl* benchmark) {
1517 benchmark->RunOnLayer(this); 1518 benchmark->RunOnLayer(this);
1518 } 1519 }
1519 } // namespace cc 1520 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/test/data/layer_sort_cubes.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698