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

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

Issue 2144393003: cc: Allow TestDelegatingOutputSurface to be used for non-pixel tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « no previous file | cc/BUILD.gn » ('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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 std::unique_ptr<cc::TextureMailboxDeleter> texture_mailbox_deleter( 59 std::unique_ptr<cc::TextureMailboxDeleter> texture_mailbox_deleter(
60 new cc::TextureMailboxDeleter(nullptr)); 60 new cc::TextureMailboxDeleter(nullptr));
61 std::unique_ptr<ParentOutputSurface> output_surface_holder( 61 std::unique_ptr<ParentOutputSurface> output_surface_holder(
62 new ParentOutputSurface(AwRenderThreadContextProvider::Create( 62 new ParentOutputSurface(AwRenderThreadContextProvider::Create(
63 gl_surface_, DeferredGpuCommandService::GetInstance()))); 63 gl_surface_, DeferredGpuCommandService::GetInstance())));
64 output_surface_ = output_surface_holder.get(); 64 output_surface_ = output_surface_holder.get();
65 std::unique_ptr<cc::DisplayScheduler> scheduler(new cc::DisplayScheduler( 65 std::unique_ptr<cc::DisplayScheduler> scheduler(new cc::DisplayScheduler(
66 begin_frame_source.get(), nullptr, 66 begin_frame_source.get(), nullptr,
67 output_surface_holder->capabilities().max_frames_pending)); 67 output_surface_holder->capabilities().max_frames_pending));
68 display_.reset(new cc::Display( 68 display_.reset(new cc::Display(
69 surface_manager_.get(), nullptr /* shared_bitmap_manager */, 69 nullptr /* shared_bitmap_manager */,
70 nullptr /* gpu_memory_buffer_manager */, settings, 70 nullptr /* gpu_memory_buffer_manager */, settings,
71 surface_id_allocator_->client_id(), std::move(begin_frame_source), 71 std::move(begin_frame_source), std::move(output_surface_holder),
72 std::move(output_surface_holder), std::move(scheduler), 72 std::move(scheduler), std::move(texture_mailbox_deleter)));
73 std::move(texture_mailbox_deleter))); 73 display_->Initialize(this, surface_manager_.get(),
74 display_->Initialize(this); 74 surface_id_allocator_->client_id());
75 75
76 surface_factory_.reset(new cc::SurfaceFactory(surface_manager_.get(), this)); 76 surface_factory_.reset(new cc::SurfaceFactory(surface_manager_.get(), this));
77 77
78 DCHECK(!g_surfaces_instance); 78 DCHECK(!g_surfaces_instance);
79 g_surfaces_instance = this; 79 g_surfaces_instance = this;
80 80
81 } 81 }
82 82
83 SurfacesInstance::~SurfacesInstance() { 83 SurfacesInstance::~SurfacesInstance() {
84 DCHECK_EQ(g_surfaces_instance, this); 84 DCHECK_EQ(g_surfaces_instance, this);
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 CHECK(resources.empty()); 185 CHECK(resources.empty());
186 } 186 }
187 187
188 void SurfacesInstance::SetBeginFrameSource( 188 void SurfacesInstance::SetBeginFrameSource(
189 cc::BeginFrameSource* begin_frame_source) { 189 cc::BeginFrameSource* begin_frame_source) {
190 // Parent compsitor calls DrawAndSwap directly and doesn't use 190 // Parent compsitor calls DrawAndSwap directly and doesn't use
191 // BeginFrameSource. 191 // BeginFrameSource.
192 } 192 }
193 193
194 } // namespace android_webview 194 } // namespace android_webview
OLDNEW
« no previous file with comments | « no previous file | cc/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698