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

Side by Side Diff: content/browser/compositor/onscreen_display_client.cc

Issue 675083002: Add cc::RendererSettings for use in with cc::Display (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 "content/browser/compositor/onscreen_display_client.h" 5 #include "content/browser/compositor/onscreen_display_client.h"
6 6
7 #include "base/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "cc/output/output_surface.h" 8 #include "cc/output/output_surface.h"
9 #include "cc/surfaces/surface_factory.h" 9 #include "cc/surfaces/surface_factory.h"
10 #include "cc/surfaces/surface_manager.h" 10 #include "cc/surfaces/surface_manager.h"
11 #include "content/browser/compositor/surface_display_output_surface.h" 11 #include "content/browser/compositor/surface_display_output_surface.h"
12 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h" 12 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h"
13 #include "content/common/host_shared_bitmap_manager.h" 13 #include "content/common/host_shared_bitmap_manager.h"
14 14
15 namespace content { 15 namespace content {
16 16
17 OnscreenDisplayClient::OnscreenDisplayClient( 17 OnscreenDisplayClient::OnscreenDisplayClient(
18 scoped_ptr<cc::OutputSurface> output_surface, 18 scoped_ptr<cc::OutputSurface> output_surface,
19 cc::SurfaceManager* manager, 19 cc::SurfaceManager* manager,
20 const cc::RendererSettings& settings,
20 scoped_refptr<base::SingleThreadTaskRunner> task_runner) 21 scoped_refptr<base::SingleThreadTaskRunner> task_runner)
21 : output_surface_(output_surface.Pass()), 22 : output_surface_(output_surface.Pass()),
22 display_(new cc::Display(this, 23 display_(new cc::Display(this,
23 manager, 24 manager,
24 HostSharedBitmapManager::current(), 25 HostSharedBitmapManager::current(),
25 BrowserGpuMemoryBufferManager::current())), 26 BrowserGpuMemoryBufferManager::current(),
27 settings)),
26 task_runner_(task_runner), 28 task_runner_(task_runner),
27 scheduled_draw_(false), 29 scheduled_draw_(false),
28 output_surface_lost_(false), 30 output_surface_lost_(false),
29 deferred_draw_(false), 31 deferred_draw_(false),
30 pending_frames_(0), 32 pending_frames_(0),
31 weak_ptr_factory_(this) { 33 weak_ptr_factory_(this) {
32 } 34 }
33 35
34 OnscreenDisplayClient::~OnscreenDisplayClient() { 36 OnscreenDisplayClient::~OnscreenDisplayClient() {
35 } 37 }
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 ScheduleDraw(); 89 ScheduleDraw();
88 } 90 }
89 } 91 }
90 92
91 void OnscreenDisplayClient::SetMemoryPolicy( 93 void OnscreenDisplayClient::SetMemoryPolicy(
92 const cc::ManagedMemoryPolicy& policy) { 94 const cc::ManagedMemoryPolicy& policy) {
93 surface_display_output_surface_->SetMemoryPolicy(policy); 95 surface_display_output_surface_->SetMemoryPolicy(policy);
94 } 96 }
95 97
96 } // namespace content 98 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/compositor/onscreen_display_client.h ('k') | content/browser/renderer_host/compositor_impl_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698