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