| OLD | NEW |
| 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 deferred_draw_(false), | 30 deferred_draw_(false), |
| 29 pending_frames_(0), | 31 pending_frames_(0), |
| 30 weak_ptr_factory_(this) { | 32 weak_ptr_factory_(this) { |
| 31 } | 33 } |
| 32 | 34 |
| 33 OnscreenDisplayClient::~OnscreenDisplayClient() { | 35 OnscreenDisplayClient::~OnscreenDisplayClient() { |
| 34 } | 36 } |
| 35 | 37 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 ScheduleDraw(); | 85 ScheduleDraw(); |
| 84 } | 86 } |
| 85 } | 87 } |
| 86 | 88 |
| 87 void OnscreenDisplayClient::SetMemoryPolicy( | 89 void OnscreenDisplayClient::SetMemoryPolicy( |
| 88 const cc::ManagedMemoryPolicy& policy) { | 90 const cc::ManagedMemoryPolicy& policy) { |
| 89 surface_display_output_surface_->SetMemoryPolicy(policy); | 91 surface_display_output_surface_->SetMemoryPolicy(policy); |
| 90 } | 92 } |
| 91 | 93 |
| 92 } // namespace content | 94 } // namespace content |
| OLD | NEW |