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

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

Issue 2527283003: cc: Introduce BeginFrame sequence numbers and acknowledgements.
Patch Set: Address Brian's comments. Created 4 years 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
« no previous file with comments | « no previous file | blimp/client/support/compositor/blimp_embedder_compositor.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/surfaces_instance.h" 5 #include "android_webview/browser/surfaces_instance.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "android_webview/browser/aw_gl_surface.h" 10 #include "android_webview/browser/aw_gl_surface.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 std::unique_ptr<cc::BeginFrameSource> begin_frame_source( 58 std::unique_ptr<cc::BeginFrameSource> begin_frame_source(
59 new cc::StubBeginFrameSource); 59 new cc::StubBeginFrameSource);
60 std::unique_ptr<cc::TextureMailboxDeleter> texture_mailbox_deleter( 60 std::unique_ptr<cc::TextureMailboxDeleter> texture_mailbox_deleter(
61 new cc::TextureMailboxDeleter(nullptr)); 61 new cc::TextureMailboxDeleter(nullptr));
62 std::unique_ptr<ParentOutputSurface> output_surface_holder( 62 std::unique_ptr<ParentOutputSurface> output_surface_holder(
63 new ParentOutputSurface(AwRenderThreadContextProvider::Create( 63 new ParentOutputSurface(AwRenderThreadContextProvider::Create(
64 make_scoped_refptr(new AwGLSurface), 64 make_scoped_refptr(new AwGLSurface),
65 DeferredGpuCommandService::GetInstance()))); 65 DeferredGpuCommandService::GetInstance())));
66 output_surface_ = output_surface_holder.get(); 66 output_surface_ = output_surface_holder.get();
67 std::unique_ptr<cc::DisplayScheduler> scheduler(new cc::DisplayScheduler( 67 std::unique_ptr<cc::DisplayScheduler> scheduler(new cc::DisplayScheduler(
68 begin_frame_source.get(), nullptr, 68 nullptr, output_surface_holder->capabilities().max_frames_pending));
69 output_surface_holder->capabilities().max_frames_pending));
70 display_.reset(new cc::Display( 69 display_.reset(new cc::Display(
71 nullptr /* shared_bitmap_manager */, 70 nullptr /* shared_bitmap_manager */,
72 nullptr /* gpu_memory_buffer_manager */, settings, frame_sink_id_, 71 nullptr /* gpu_memory_buffer_manager */, settings, frame_sink_id_,
73 std::move(begin_frame_source), std::move(output_surface_holder), 72 std::move(begin_frame_source), std::move(output_surface_holder),
74 std::move(scheduler), std::move(texture_mailbox_deleter))); 73 std::move(scheduler), std::move(texture_mailbox_deleter)));
75 display_->Initialize(this, surface_manager_.get()); 74 display_->Initialize(this, surface_manager_.get());
76 display_->SetVisible(true); 75 display_->SetVisible(true);
77 76
78 DCHECK(!g_surfaces_instance); 77 DCHECK(!g_surfaces_instance);
79 g_surfaces_instance = this; 78 g_surfaces_instance = this;
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 CHECK(resources.empty()); 173 CHECK(resources.empty());
175 } 174 }
176 175
177 void SurfacesInstance::SetBeginFrameSource( 176 void SurfacesInstance::SetBeginFrameSource(
178 cc::BeginFrameSource* begin_frame_source) { 177 cc::BeginFrameSource* begin_frame_source) {
179 // Parent compsitor calls DrawAndSwap directly and doesn't use 178 // Parent compsitor calls DrawAndSwap directly and doesn't use
180 // BeginFrameSource. 179 // BeginFrameSource.
181 } 180 }
182 181
183 } // namespace android_webview 182 } // namespace android_webview
OLDNEW
« no previous file with comments | « no previous file | blimp/client/support/compositor/blimp_embedder_compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698