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_impl.h" | 5 #include "cc/layers/delegated_renderer_layer_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 ConvertDelegatedRenderPassId(render_passes_in_draw_order_[i]->id); | 248 ConvertDelegatedRenderPassId(render_passes_in_draw_order_[i]->id); |
249 | 249 |
250 // Don't clash with the RenderPass we generate if we own a RenderSurface. | 250 // Don't clash with the RenderPass we generate if we own a RenderSurface. |
251 DCHECK_GT(output_render_pass_id.index, 0); | 251 DCHECK_GT(output_render_pass_id.index, 0); |
252 | 252 |
253 render_pass_sink->AppendRenderPass( | 253 render_pass_sink->AppendRenderPass( |
254 render_passes_in_draw_order_[i]->Copy(output_render_pass_id)); | 254 render_passes_in_draw_order_[i]->Copy(output_render_pass_id)); |
255 } | 255 } |
256 } | 256 } |
257 | 257 |
| 258 bool DelegatedRendererLayerImpl::WillDraw(DrawMode draw_mode, |
| 259 ResourceProvider* resource_provider) { |
| 260 if (draw_mode == DRAW_MODE_RESOURCELESS_SOFTWARE) |
| 261 return false; |
| 262 return LayerImpl::WillDraw(draw_mode, resource_provider); |
| 263 } |
| 264 |
258 void DelegatedRendererLayerImpl::AppendQuads( | 265 void DelegatedRendererLayerImpl::AppendQuads( |
259 QuadSink* quad_sink, | 266 QuadSink* quad_sink, |
260 AppendQuadsData* append_quads_data) { | 267 AppendQuadsData* append_quads_data) { |
261 AppendRainbowDebugBorder(quad_sink, append_quads_data); | 268 AppendRainbowDebugBorder(quad_sink, append_quads_data); |
262 | 269 |
263 if (render_passes_in_draw_order_.empty()) | 270 if (render_passes_in_draw_order_.empty()) |
264 return; | 271 return; |
265 | 272 |
266 RenderPass::Id target_render_pass_id = append_quads_data->render_pass_id; | 273 RenderPass::Id target_render_pass_id = append_quads_data->render_pass_id; |
267 | 274 |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
463 | 470 |
464 if (own_child_id_) { | 471 if (own_child_id_) { |
465 ResourceProvider* provider = layer_tree_impl()->resource_provider(); | 472 ResourceProvider* provider = layer_tree_impl()->resource_provider(); |
466 provider->DestroyChild(child_id_); | 473 provider->DestroyChild(child_id_); |
467 } | 474 } |
468 | 475 |
469 child_id_ = 0; | 476 child_id_ = 0; |
470 } | 477 } |
471 | 478 |
472 } // namespace cc | 479 } // namespace cc |
OLD | NEW |