OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "content/renderer/android/synchronous_compositor_frame_sink.h" | 5 #include "content/renderer/android/synchronous_compositor_frame_sink.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 // and positions it based on the provided viewport. | 266 // and positions it based on the provided viewport. |
267 // TODO(danakj): We could apply the transform here instead of passing it to | 267 // TODO(danakj): We could apply the transform here instead of passing it to |
268 // the CompositorFrameSink client too? (We'd have to do the same for | 268 // the CompositorFrameSink client too? (We'd have to do the same for |
269 // hardware frames in SurfacesInstance?) | 269 // hardware frames in SurfacesInstance?) |
270 cc::CompositorFrame embed_frame; | 270 cc::CompositorFrame embed_frame; |
271 embed_frame.render_pass_list.push_back(cc::RenderPass::Create()); | 271 embed_frame.render_pass_list.push_back(cc::RenderPass::Create()); |
272 | 272 |
273 // The embedding RenderPass covers the entire Display's area. | 273 // The embedding RenderPass covers the entire Display's area. |
274 const auto& embed_render_pass = embed_frame.render_pass_list.back(); | 274 const auto& embed_render_pass = embed_frame.render_pass_list.back(); |
275 embed_render_pass->SetAll(cc::RenderPassId(1, 1), gfx::Rect(display_size), | 275 embed_render_pass->SetAll(cc::RenderPassId(1, 1), gfx::Rect(display_size), |
276 gfx::Rect(display_size), gfx::Transform(), false); | 276 gfx::Rect(display_size), gfx::Transform(), |
| 277 cc::FilterOperations(), cc::FilterOperations(), |
| 278 false); |
277 | 279 |
278 // The RenderPass has a single SurfaceDrawQuad (and SharedQuadState for it). | 280 // The RenderPass has a single SurfaceDrawQuad (and SharedQuadState for it). |
279 auto* shared_quad_state = | 281 auto* shared_quad_state = |
280 embed_render_pass->CreateAndAppendSharedQuadState(); | 282 embed_render_pass->CreateAndAppendSharedQuadState(); |
281 auto* surface_quad = | 283 auto* surface_quad = |
282 embed_render_pass->CreateAndAppendDrawQuad<cc::SurfaceDrawQuad>(); | 284 embed_render_pass->CreateAndAppendDrawQuad<cc::SurfaceDrawQuad>(); |
283 shared_quad_state->SetAll( | 285 shared_quad_state->SetAll( |
284 child_transform, child_size, gfx::Rect(child_size), | 286 child_transform, child_size, gfx::Rect(child_size), |
285 gfx::Rect() /* clip_rect */, false /* is_clipped */, 1.f /* opacity */, | 287 gfx::Rect() /* clip_rect */, false /* is_clipped */, 1.f /* opacity */, |
286 SkBlendMode::kSrcOver, 0 /* sorting_context_id */); | 288 SkBlendMode::kSrcOver, 0 /* sorting_context_id */); |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
462 client_->ReclaimResources(resources); | 464 client_->ReclaimResources(resources); |
463 } | 465 } |
464 | 466 |
465 void SynchronousCompositorFrameSink::SetBeginFrameSource( | 467 void SynchronousCompositorFrameSink::SetBeginFrameSource( |
466 cc::BeginFrameSource* begin_frame_source) { | 468 cc::BeginFrameSource* begin_frame_source) { |
467 // Software output is synchronous and doesn't use a BeginFrameSource. | 469 // Software output is synchronous and doesn't use a BeginFrameSource. |
468 NOTREACHED(); | 470 NOTREACHED(); |
469 } | 471 } |
470 | 472 |
471 } // namespace content | 473 } // namespace content |
OLD | NEW |