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 <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 1095 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1106 static void PostCopyCallbackToMainThread( | 1106 static void PostCopyCallbackToMainThread( |
1107 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner, | 1107 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner, |
1108 std::unique_ptr<CopyOutputRequest> request, | 1108 std::unique_ptr<CopyOutputRequest> request, |
1109 std::unique_ptr<CopyOutputResult> result) { | 1109 std::unique_ptr<CopyOutputResult> result) { |
1110 main_thread_task_runner->PostTask(FROM_HERE, | 1110 main_thread_task_runner->PostTask(FROM_HERE, |
1111 base::Bind(&RunCopyCallbackOnMainThread, | 1111 base::Bind(&RunCopyCallbackOnMainThread, |
1112 base::Passed(&request), | 1112 base::Passed(&request), |
1113 base::Passed(&result))); | 1113 base::Passed(&result))); |
1114 } | 1114 } |
1115 | 1115 |
| 1116 bool Layer::IsSnapped() { |
| 1117 return scrollable(); |
| 1118 } |
| 1119 |
1116 void Layer::PushPropertiesTo(LayerImpl* layer) { | 1120 void Layer::PushPropertiesTo(LayerImpl* layer) { |
1117 TRACE_EVENT0("cc", "Layer::PushPropertiesTo"); | 1121 TRACE_EVENT0("cc", "Layer::PushPropertiesTo"); |
1118 DCHECK(layer_tree_host_); | 1122 DCHECK(layer_tree_host_); |
1119 | 1123 |
1120 // If we did not SavePaintProperties() for the layer this frame, then push the | 1124 // If we did not SavePaintProperties() for the layer this frame, then push the |
1121 // real property values, not the paint property values. | 1125 // real property values, not the paint property values. |
1122 bool use_paint_properties = paint_properties_.source_frame_number == | 1126 bool use_paint_properties = paint_properties_.source_frame_number == |
1123 layer_tree_host_->SourceFrameNumber(); | 1127 layer_tree_host_->SourceFrameNumber(); |
1124 | 1128 |
1125 layer->SetBackgroundColor(inputs_.background_color); | 1129 layer->SetBackgroundColor(inputs_.background_color); |
(...skipping 759 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1885 | 1889 |
1886 LayerTree* Layer::GetLayerTree() const { | 1890 LayerTree* Layer::GetLayerTree() const { |
1887 return layer_tree_; | 1891 return layer_tree_; |
1888 } | 1892 } |
1889 | 1893 |
1890 void Layer::SetLayerIdForTesting(int id) { | 1894 void Layer::SetLayerIdForTesting(int id) { |
1891 inputs_.layer_id = id; | 1895 inputs_.layer_id = id; |
1892 } | 1896 } |
1893 | 1897 |
1894 } // namespace cc | 1898 } // namespace cc |
OLD | NEW |