Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(178)

Side by Side Diff: android_webview/browser/hardware_renderer.cc

Issue 2096493002: Make cc::CompositorFrames movable [Part 1 of 2] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix reflector Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | android_webview/browser/parent_output_surface.h » ('j') | cc/ipc/cc_param_traits.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698