OLD | NEW |
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/json/json_reader.h" | 7 #include "base/json/json_reader.h" |
8 #include "base/numerics/safe_conversions.h" | 8 #include "base/numerics/safe_conversions.h" |
9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
10 #include "base/trace_event/trace_event.h" | 10 #include "base/trace_event/trace_event.h" |
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
510 | 510 |
511 skia::RefPtr<SkPicture> LayerImpl::GetPicture() { | 511 skia::RefPtr<SkPicture> LayerImpl::GetPicture() { |
512 return skia::RefPtr<SkPicture>(); | 512 return skia::RefPtr<SkPicture>(); |
513 } | 513 } |
514 | 514 |
515 scoped_ptr<LayerImpl> LayerImpl::CreateLayerImpl(LayerTreeImpl* tree_impl) { | 515 scoped_ptr<LayerImpl> LayerImpl::CreateLayerImpl(LayerTreeImpl* tree_impl) { |
516 return LayerImpl::Create(tree_impl, layer_id_, scroll_offset_); | 516 return LayerImpl::Create(tree_impl, layer_id_, scroll_offset_); |
517 } | 517 } |
518 | 518 |
519 void LayerImpl::PushPropertiesTo(LayerImpl* layer) { | 519 void LayerImpl::PushPropertiesTo(LayerImpl* layer) { |
| 520 layer->draw_properties().is_clipped_from_property_trees = |
| 521 draw_properties_.is_clipped_from_property_trees; |
520 layer->SetTransformOrigin(transform_origin_); | 522 layer->SetTransformOrigin(transform_origin_); |
521 layer->SetBackgroundColor(background_color_); | 523 layer->SetBackgroundColor(background_color_); |
522 layer->SetBounds(bounds_); | 524 layer->SetBounds(bounds_); |
523 layer->SetDoubleSided(double_sided_); | 525 layer->SetDoubleSided(double_sided_); |
524 layer->SetDrawCheckerboardForMissingTiles( | 526 layer->SetDrawCheckerboardForMissingTiles( |
525 draw_checkerboard_for_missing_tiles_); | 527 draw_checkerboard_for_missing_tiles_); |
526 layer->SetDrawsContent(DrawsContent()); | 528 layer->SetDrawsContent(DrawsContent()); |
527 layer->SetHideLayerAndSubtree(hide_layer_and_subtree_); | 529 layer->SetHideLayerAndSubtree(hide_layer_and_subtree_); |
528 layer->SetHasRenderSurface(!!render_surface()); | 530 layer->SetHasRenderSurface(!!render_surface()); |
529 layer->SetFilters(filters()); | 531 layer->SetFilters(filters()); |
(...skipping 1258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1788 gfx::Rect LayerImpl::GetScaledEnclosingRectInTargetSpace(float scale) const { | 1790 gfx::Rect LayerImpl::GetScaledEnclosingRectInTargetSpace(float scale) const { |
1789 gfx::Transform scaled_draw_transform = | 1791 gfx::Transform scaled_draw_transform = |
1790 draw_properties_.target_space_transform; | 1792 draw_properties_.target_space_transform; |
1791 scaled_draw_transform.Scale(SK_MScalar1 / scale, SK_MScalar1 / scale); | 1793 scaled_draw_transform.Scale(SK_MScalar1 / scale, SK_MScalar1 / scale); |
1792 gfx::Size scaled_bounds = gfx::ToCeiledSize(gfx::ScaleSize(bounds(), scale)); | 1794 gfx::Size scaled_bounds = gfx::ToCeiledSize(gfx::ScaleSize(bounds(), scale)); |
1793 return MathUtil::MapEnclosingClippedRect(scaled_draw_transform, | 1795 return MathUtil::MapEnclosingClippedRect(scaled_draw_transform, |
1794 gfx::Rect(scaled_bounds)); | 1796 gfx::Rect(scaled_bounds)); |
1795 } | 1797 } |
1796 | 1798 |
1797 } // namespace cc | 1799 } // namespace cc |
OLD | NEW |