| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "android_webview/browser/hardware_renderer.h" | 5 #include "android_webview/browser/hardware_renderer.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "android_webview/browser/aw_gl_surface.h" | 9 #include "android_webview/browser/aw_gl_surface.h" |
| 10 #include "android_webview/browser/aw_render_thread_context_provider.h" | 10 #include "android_webview/browser/aw_render_thread_context_provider.h" |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 quad_state->opacity = 1.f; | 211 quad_state->opacity = 1.f; |
| 212 | 212 |
| 213 cc::SurfaceDrawQuad* surface_quad = | 213 cc::SurfaceDrawQuad* surface_quad = |
| 214 render_pass->CreateAndAppendDrawQuad<cc::SurfaceDrawQuad>(); | 214 render_pass->CreateAndAppendDrawQuad<cc::SurfaceDrawQuad>(); |
| 215 surface_quad->SetNew(quad_state, gfx::Rect(quad_state->quad_layer_bounds), | 215 surface_quad->SetNew(quad_state, gfx::Rect(quad_state->quad_layer_bounds), |
| 216 gfx::Rect(quad_state->quad_layer_bounds), child_id_); | 216 gfx::Rect(quad_state->quad_layer_bounds), child_id_); |
| 217 | 217 |
| 218 std::unique_ptr<cc::DelegatedFrameData> delegated_frame( | 218 std::unique_ptr<cc::DelegatedFrameData> delegated_frame( |
| 219 new cc::DelegatedFrameData); | 219 new cc::DelegatedFrameData); |
| 220 delegated_frame->render_pass_list.push_back(std::move(render_pass)); | 220 delegated_frame->render_pass_list.push_back(std::move(render_pass)); |
| 221 std::unique_ptr<cc::CompositorFrame> frame(new cc::CompositorFrame); | 221 std::unique_ptr<cc::CompositorFrame> frame(cc::CompositorFrame::Create()); |
| 222 frame->delegated_frame_data = std::move(delegated_frame); | 222 frame->delegated_frame_data = std::move(delegated_frame); |
| 223 | 223 |
| 224 if (root_id_.is_null()) { | 224 if (root_id_.is_null()) { |
| 225 root_id_ = surface_id_allocator_->GenerateId(); | 225 root_id_ = surface_id_allocator_->GenerateId(); |
| 226 surface_factory_->Create(root_id_); | 226 surface_factory_->Create(root_id_); |
| 227 display_->SetSurfaceId(root_id_, 1.f); | 227 display_->SetSurfaceId(root_id_, 1.f); |
| 228 } | 228 } |
| 229 surface_factory_->SubmitCompositorFrame(root_id_, std::move(frame), | 229 surface_factory_->SubmitCompositorFrame(root_id_, std::move(frame), |
| 230 cc::SurfaceFactory::DrawCallback()); | 230 cc::SurfaceFactory::DrawCallback()); |
| 231 | 231 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 const cc::ReturnedResourceArray& resources, | 272 const cc::ReturnedResourceArray& resources, |
| 273 const CompositorID& compositor_id, | 273 const CompositorID& compositor_id, |
| 274 uint32_t output_surface_id) { | 274 uint32_t output_surface_id) { |
| 275 if (output_surface_id != last_committed_output_surface_id_) | 275 if (output_surface_id != last_committed_output_surface_id_) |
| 276 return; | 276 return; |
| 277 render_thread_manager_->InsertReturnedResourcesOnRT(resources, compositor_id, | 277 render_thread_manager_->InsertReturnedResourcesOnRT(resources, compositor_id, |
| 278 output_surface_id); | 278 output_surface_id); |
| 279 } | 279 } |
| 280 | 280 |
| 281 } // namespace android_webview | 281 } // namespace android_webview |
| OLD | NEW |