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

Side by Side Diff: cc/surfaces/onscreen_display_client.cc

Issue 2036563002: Delete OnscreenDisplayClient and TopLevelDisplayClient. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: onscreendisplayclient: webview-scoped-allow-gl-for-hardwarerenderer-constructor 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
« no previous file with comments | « cc/surfaces/onscreen_display_client.h ('k') | cc/surfaces/surface_display_output_surface.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "cc/surfaces/onscreen_display_client.h"
6
7 #include "base/trace_event/trace_event.h"
8 #include "cc/output/output_surface.h"
9 #include "cc/scheduler/begin_frame_source.h"
10 #include "cc/surfaces/display_scheduler.h"
11 #include "cc/surfaces/surface_display_output_surface.h"
12 #include "cc/surfaces/surface_factory.h"
13 #include "cc/surfaces/surface_manager.h"
14
15 namespace cc {
16
17 OnscreenDisplayClient::OnscreenDisplayClient(
18 std::unique_ptr<OutputSurface> output_surface,
19 SurfaceManager* manager,
20 SharedBitmapManager* bitmap_manager,
21 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
22 const RendererSettings& settings,
23 scoped_refptr<base::SingleThreadTaskRunner> task_runner,
24 uint32_t compositor_surface_namespace)
25 : output_surface_(std::move(output_surface)),
26 task_runner_(task_runner),
27 display_(new Display(this,
28 manager,
29 bitmap_manager,
30 gpu_memory_buffer_manager,
31 settings,
32 compositor_surface_namespace)),
33 output_surface_lost_(false) {}
34
35 OnscreenDisplayClient::~OnscreenDisplayClient() {
36 }
37
38 bool OnscreenDisplayClient::Initialize() {
39 DCHECK(output_surface_);
40 return display_->Initialize(std::move(output_surface_), task_runner_.get());
41 }
42
43 void OnscreenDisplayClient::OutputSurfaceLost() {
44 output_surface_lost_ = true;
45 surface_display_output_surface_->DidLoseOutputSurface();
46 }
47
48 void OnscreenDisplayClient::SetMemoryPolicy(const ManagedMemoryPolicy& policy) {
49 surface_display_output_surface_->SetMemoryPolicy(policy);
50 }
51
52 } // namespace cc
OLDNEW
« no previous file with comments | « cc/surfaces/onscreen_display_client.h ('k') | cc/surfaces/surface_display_output_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698