| 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/delegated_renderer_layer.h" | 5 #include "cc/layers/delegated_renderer_layer.h" |
| 6 | 6 |
| 7 #include "cc/layers/delegated_renderer_layer_impl.h" | 7 #include "cc/layers/delegated_renderer_layer_impl.h" |
| 8 #include "cc/output/delegated_frame_data.h" | 8 #include "cc/output/delegated_frame_data.h" |
| 9 #include "cc/quads/render_pass_draw_quad.h" | 9 #include "cc/quads/render_pass_draw_quad.h" |
| 10 #include "cc/trees/blocking_task_runner.h" | 10 #include "cc/trees/blocking_task_runner.h" |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 RenderPassDrawQuad::MaterialCast(quad_list[j]); | 106 RenderPassDrawQuad::MaterialCast(quad_list[j]); |
| 107 if (!render_pass_quad->filters.IsEmpty() || | 107 if (!render_pass_quad->filters.IsEmpty() || |
| 108 !render_pass_quad->background_filters.IsEmpty()) | 108 !render_pass_quad->background_filters.IsEmpty()) |
| 109 return true; | 109 return true; |
| 110 } | 110 } |
| 111 } | 111 } |
| 112 return false; | 112 return false; |
| 113 } | 113 } |
| 114 | 114 |
| 115 bool DelegatedRendererLayer::Update(ResourceUpdateQueue* queue, | 115 bool DelegatedRendererLayer::Update(ResourceUpdateQueue* queue, |
| 116 const OcclusionTracker* occlusion) { | 116 const OcclusionTracker<Layer>* occlusion) { |
| 117 bool updated = Layer::Update(queue, occlusion); | 117 bool updated = Layer::Update(queue, occlusion); |
| 118 if (!should_collect_new_frame_) | 118 if (!should_collect_new_frame_) |
| 119 return updated; | 119 return updated; |
| 120 | 120 |
| 121 frame_data_ = | 121 frame_data_ = |
| 122 frame_provider_->GetFrameDataAndRefResources(this, &frame_damage_); | 122 frame_provider_->GetFrameDataAndRefResources(this, &frame_damage_); |
| 123 should_collect_new_frame_ = false; | 123 should_collect_new_frame_ = false; |
| 124 | 124 |
| 125 // If any quad has a filter operation or a blend mode other than normal, | 125 // If any quad has a filter operation or a blend mode other than normal, |
| 126 // then we need an offscreen context to draw this layer's content. | 126 // then we need an offscreen context to draw this layer's content. |
| 127 if (FrameDataRequiresFilterContext(frame_data_)) | 127 if (FrameDataRequiresFilterContext(frame_data_)) |
| 128 layer_tree_host()->set_needs_filter_context(); | 128 layer_tree_host()->set_needs_filter_context(); |
| 129 | 129 |
| 130 SetNeedsPushProperties(); | 130 SetNeedsPushProperties(); |
| 131 return true; | 131 return true; |
| 132 } | 132 } |
| 133 | 133 |
| 134 } // namespace cc | 134 } // namespace cc |
| OLD | NEW |