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 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 gfx::Rect(display_size), gfx::Transform(), false); | 276 gfx::Rect(display_size), gfx::Transform(), false); |
277 | 277 |
278 // The RenderPass has a single SurfaceDrawQuad (and SharedQuadState for it). | 278 // The RenderPass has a single SurfaceDrawQuad (and SharedQuadState for it). |
279 auto* shared_quad_state = | 279 auto* shared_quad_state = |
280 embed_render_pass->CreateAndAppendSharedQuadState(); | 280 embed_render_pass->CreateAndAppendSharedQuadState(); |
281 auto* surface_quad = | 281 auto* surface_quad = |
282 embed_render_pass->CreateAndAppendDrawQuad<cc::SurfaceDrawQuad>(); | 282 embed_render_pass->CreateAndAppendDrawQuad<cc::SurfaceDrawQuad>(); |
283 shared_quad_state->SetAll( | 283 shared_quad_state->SetAll( |
284 child_transform, child_size, gfx::Rect(child_size), | 284 child_transform, child_size, gfx::Rect(child_size), |
285 gfx::Rect() /* clip_rect */, false /* is_clipped */, 1.f /* opacity */, | 285 gfx::Rect() /* clip_rect */, false /* is_clipped */, 1.f /* opacity */, |
286 SkXfermode::kSrcOver_Mode, 0 /* sorting_context_id */); | 286 SkBlendMode::kSrcOver, 0 /* sorting_context_id */); |
287 surface_quad->SetNew(shared_quad_state, gfx::Rect(child_size), | 287 surface_quad->SetNew(shared_quad_state, gfx::Rect(child_size), |
288 gfx::Rect(child_size), | 288 gfx::Rect(child_size), |
289 cc::SurfaceId(kFrameSinkId, child_local_frame_id_)); | 289 cc::SurfaceId(kFrameSinkId, child_local_frame_id_)); |
290 | 290 |
291 surface_factory_->SubmitCompositorFrame( | 291 surface_factory_->SubmitCompositorFrame( |
292 child_local_frame_id_, std::move(frame), base::Bind(&NoOpDrawCallback)); | 292 child_local_frame_id_, std::move(frame), base::Bind(&NoOpDrawCallback)); |
293 surface_factory_->SubmitCompositorFrame(root_local_frame_id_, | 293 surface_factory_->SubmitCompositorFrame(root_local_frame_id_, |
294 std::move(embed_frame), | 294 std::move(embed_frame), |
295 base::Bind(&NoOpDrawCallback)); | 295 base::Bind(&NoOpDrawCallback)); |
296 display_->DrawAndSwap(); | 296 display_->DrawAndSwap(); |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
462 client_->ReclaimResources(resources); | 462 client_->ReclaimResources(resources); |
463 } | 463 } |
464 | 464 |
465 void SynchronousCompositorFrameSink::SetBeginFrameSource( | 465 void SynchronousCompositorFrameSink::SetBeginFrameSource( |
466 cc::BeginFrameSource* begin_frame_source) { | 466 cc::BeginFrameSource* begin_frame_source) { |
467 // Software output is synchronous and doesn't use a BeginFrameSource. | 467 // Software output is synchronous and doesn't use a BeginFrameSource. |
468 NOTREACHED(); | 468 NOTREACHED(); |
469 } | 469 } |
470 | 470 |
471 } // namespace content | 471 } // namespace content |
OLD | NEW |