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/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
9 #include "base/trace_event/trace_event.h" | 9 #include "base/trace_event/trace_event.h" |
10 #include "base/trace_event/trace_event_argument.h" | 10 #include "base/trace_event/trace_event_argument.h" |
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
510 layer->SetTransformOrigin(transform_origin_); | 510 layer->SetTransformOrigin(transform_origin_); |
511 layer->SetBackgroundColor(background_color_); | 511 layer->SetBackgroundColor(background_color_); |
512 layer->SetBounds(bounds_); | 512 layer->SetBounds(bounds_); |
513 layer->SetContentBounds(content_bounds()); | 513 layer->SetContentBounds(content_bounds()); |
514 layer->SetContentsScale(contents_scale_x(), contents_scale_y()); | 514 layer->SetContentsScale(contents_scale_x(), contents_scale_y()); |
515 layer->SetDoubleSided(double_sided_); | 515 layer->SetDoubleSided(double_sided_); |
516 layer->SetDrawCheckerboardForMissingTiles( | 516 layer->SetDrawCheckerboardForMissingTiles( |
517 draw_checkerboard_for_missing_tiles_); | 517 draw_checkerboard_for_missing_tiles_); |
518 layer->SetDrawsContent(DrawsContent()); | 518 layer->SetDrawsContent(DrawsContent()); |
519 layer->SetHideLayerAndSubtree(hide_layer_and_subtree_); | 519 layer->SetHideLayerAndSubtree(hide_layer_and_subtree_); |
520 layer->SetHasRenderSurface(!!render_surface()); | 520 layer->SetHasRenderSurface(!!render_surface() || layer->HasCopyRequest()); |
521 layer->SetFilters(filters()); | 521 layer->SetFilters(filters()); |
522 layer->SetBackgroundFilters(background_filters()); | 522 layer->SetBackgroundFilters(background_filters()); |
523 layer->SetMasksToBounds(masks_to_bounds_); | 523 layer->SetMasksToBounds(masks_to_bounds_); |
524 layer->SetShouldScrollOnMainThread(should_scroll_on_main_thread_); | 524 layer->SetShouldScrollOnMainThread(should_scroll_on_main_thread_); |
525 layer->SetHaveWheelEventHandlers(have_wheel_event_handlers_); | 525 layer->SetHaveWheelEventHandlers(have_wheel_event_handlers_); |
526 layer->SetHaveScrollEventHandlers(have_scroll_event_handlers_); | 526 layer->SetHaveScrollEventHandlers(have_scroll_event_handlers_); |
527 layer->SetScrollBlocksOn(scroll_blocks_on_); | 527 layer->SetScrollBlocksOn(scroll_blocks_on_); |
528 layer->SetNonFastScrollableRegion(non_fast_scrollable_region_); | 528 layer->SetNonFastScrollableRegion(non_fast_scrollable_region_); |
529 layer->SetTouchEventHandlerRegion(touch_event_handler_region_); | 529 layer->SetTouchEventHandlerRegion(touch_event_handler_region_); |
530 layer->SetContentsOpaque(contents_opaque_); | 530 layer->SetContentsOpaque(contents_opaque_); |
(...skipping 1053 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1584 SetNeedsPushProperties(); | 1584 SetNeedsPushProperties(); |
1585 layer_tree_impl()->set_needs_update_draw_properties(); | 1585 layer_tree_impl()->set_needs_update_draw_properties(); |
1586 if (should_have_render_surface) { | 1586 if (should_have_render_surface) { |
1587 render_surface_ = make_scoped_ptr(new RenderSurfaceImpl(this)); | 1587 render_surface_ = make_scoped_ptr(new RenderSurfaceImpl(this)); |
1588 return; | 1588 return; |
1589 } | 1589 } |
1590 render_surface_.reset(); | 1590 render_surface_.reset(); |
1591 } | 1591 } |
1592 | 1592 |
1593 } // namespace cc | 1593 } // namespace cc |
OLD | NEW |