OLD | NEW |
---|---|
1 // Copyright 2010 The Chromium Authors. All rights reserved. | 1 // Copyright 2010 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.h" | 5 #include "cc/layers/layer.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/debug/trace_event.h" | |
9 #include "base/location.h" | 10 #include "base/location.h" |
10 #include "base/metrics/histogram.h" | 11 #include "base/metrics/histogram.h" |
11 #include "base/single_thread_task_runner.h" | 12 #include "base/single_thread_task_runner.h" |
12 #include "cc/animation/animation.h" | 13 #include "cc/animation/animation.h" |
13 #include "cc/animation/animation_events.h" | 14 #include "cc/animation/animation_events.h" |
14 #include "cc/animation/layer_animation_controller.h" | 15 #include "cc/animation/layer_animation_controller.h" |
15 #include "cc/layers/layer_impl.h" | 16 #include "cc/layers/layer_impl.h" |
16 #include "cc/output/copy_output_request.h" | 17 #include "cc/output/copy_output_request.h" |
17 #include "cc/output/copy_output_result.h" | 18 #include "cc/output/copy_output_result.h" |
18 #include "cc/trees/layer_tree_host.h" | 19 #include "cc/trees/layer_tree_host.h" |
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
668 base::Passed(&result))); | 669 base::Passed(&result))); |
669 } | 670 } |
670 | 671 |
671 void Layer::PushPropertiesTo(LayerImpl* layer) { | 672 void Layer::PushPropertiesTo(LayerImpl* layer) { |
672 layer->SetAnchorPoint(anchor_point_); | 673 layer->SetAnchorPoint(anchor_point_); |
673 layer->SetAnchorPointZ(anchor_point_z_); | 674 layer->SetAnchorPointZ(anchor_point_z_); |
674 layer->SetBackgroundColor(background_color_); | 675 layer->SetBackgroundColor(background_color_); |
675 layer->SetBounds(paint_properties_.bounds); | 676 layer->SetBounds(paint_properties_.bounds); |
676 layer->SetContentBounds(content_bounds()); | 677 layer->SetContentBounds(content_bounds()); |
677 layer->SetContentsScale(contents_scale_x(), contents_scale_y()); | 678 layer->SetContentsScale(contents_scale_x(), contents_scale_y()); |
678 layer->SetDebugName(debug_name_); | 679 |
680 bool pulling_debug_name; | |
681 TRACE_EVENT_CATEGORY_GROUP_ENABLED(TRACE_DISABLED_BY_DEFAULT("cc.debug"), | |
enne (OOO)
2013/07/09 20:15:32
Please remove the disabled by default here.
Also,
qiankun
2013/07/10 04:53:07
Done.
enne (OOO)
2013/07/10 16:48:42
Yeah, that's exactly it. Rather than pulling the
qiankun
2013/07/11 10:04:43
Done.
| |
682 &pulling_debug_name); | |
683 if (pulling_debug_name) | |
684 layer->SetDebugName(DebugName()); | |
685 else | |
686 layer->SetDebugName(debug_name_); | |
enne (OOO)
2013/07/09 20:15:32
What about clearing the name if tracing is off?
qiankun
2013/07/10 04:53:07
Ok.
| |
687 | |
679 layer->SetCompositingReasons(compositing_reasons_); | 688 layer->SetCompositingReasons(compositing_reasons_); |
680 layer->SetDoubleSided(double_sided_); | 689 layer->SetDoubleSided(double_sided_); |
681 layer->SetDrawCheckerboardForMissingTiles( | 690 layer->SetDrawCheckerboardForMissingTiles( |
682 draw_checkerboard_for_missing_tiles_); | 691 draw_checkerboard_for_missing_tiles_); |
683 layer->SetForceRenderSurface(force_render_surface_); | 692 layer->SetForceRenderSurface(force_render_surface_); |
684 layer->SetDrawsContent(DrawsContent()); | 693 layer->SetDrawsContent(DrawsContent()); |
685 layer->SetFilters(filters()); | 694 layer->SetFilters(filters()); |
686 layer->SetFilter(filter()); | 695 layer->SetFilter(filter()); |
687 layer->SetBackgroundFilters(background_filters()); | 696 layer->SetBackgroundFilters(background_filters()); |
688 layer->SetMasksToBounds(masks_to_bounds_); | 697 layer->SetMasksToBounds(masks_to_bounds_); |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
887 | 896 |
888 RenderingStatsInstrumentation* Layer::rendering_stats_instrumentation() const { | 897 RenderingStatsInstrumentation* Layer::rendering_stats_instrumentation() const { |
889 return layer_tree_host_->rendering_stats_instrumentation(); | 898 return layer_tree_host_->rendering_stats_instrumentation(); |
890 } | 899 } |
891 | 900 |
892 bool Layer::SupportsLCDText() const { | 901 bool Layer::SupportsLCDText() const { |
893 return false; | 902 return false; |
894 } | 903 } |
895 | 904 |
896 } // namespace cc | 905 } // namespace cc |
OLD | NEW |