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

Unified Diff: cc/surfaces/onscreen_display_client.cc

Issue 888783002: Composite to cc::Display from ui::InProcessContextFactory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/onscreen_display_client.cc
diff --git a/content/browser/compositor/onscreen_display_client.cc b/cc/surfaces/onscreen_display_client.cc
similarity index 71%
rename from content/browser/compositor/onscreen_display_client.cc
rename to cc/surfaces/onscreen_display_client.cc
index c0772932321198838e52dccc80cde64643b58ad6..c9f1f7f4a3e1dcfadf1bae17665ed8403eb8e899 100644
--- a/content/browser/compositor/onscreen_display_client.cc
+++ b/cc/surfaces/onscreen_display_client.cc
@@ -2,29 +2,29 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "content/browser/compositor/onscreen_display_client.h"
+#include "cc/surfaces/onscreen_display_client.h"
#include "base/trace_event/trace_event.h"
#include "cc/output/output_surface.h"
+#include "cc/surfaces/surface_display_output_surface.h"
#include "cc/surfaces/surface_factory.h"
#include "cc/surfaces/surface_manager.h"
-#include "content/browser/compositor/surface_display_output_surface.h"
-#include "content/browser/gpu/browser_gpu_memory_buffer_manager.h"
-#include "content/common/host_shared_bitmap_manager.h"
-namespace content {
+namespace cc {
OnscreenDisplayClient::OnscreenDisplayClient(
- scoped_ptr<cc::OutputSurface> output_surface,
- cc::SurfaceManager* manager,
- const cc::RendererSettings& settings,
+ scoped_ptr<OutputSurface> output_surface,
+ SurfaceManager* manager,
+ SharedBitmapManager* bitmap_manager,
+ gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
+ const RendererSettings& settings,
scoped_refptr<base::SingleThreadTaskRunner> task_runner)
: output_surface_(output_surface.Pass()),
- display_(new cc::Display(this,
- manager,
- HostSharedBitmapManager::current(),
- BrowserGpuMemoryBufferManager::current(),
- settings)),
+ display_(new Display(this,
+ manager,
+ bitmap_manager,
+ gpu_memory_buffer_manager,
+ settings)),
task_runner_(task_runner),
scheduled_draw_(false),
output_surface_lost_(false),
@@ -60,9 +60,8 @@ void OnscreenDisplayClient::ScheduleDraw() {
DCHECK(!deferred_draw_);
DCHECK(!scheduled_draw_);
scheduled_draw_ = true;
- task_runner_->PostTask(
- FROM_HERE,
- base::Bind(&OnscreenDisplayClient::Draw, weak_ptr_factory_.GetWeakPtr()));
+ task_runner_->PostTask(FROM_HERE, base::Bind(&OnscreenDisplayClient::Draw,
+ weak_ptr_factory_.GetWeakPtr()));
}
void OnscreenDisplayClient::OutputSurfaceLost() {
@@ -90,9 +89,8 @@ void OnscreenDisplayClient::DidSwapBuffersComplete() {
}
}
-void OnscreenDisplayClient::SetMemoryPolicy(
- const cc::ManagedMemoryPolicy& policy) {
+void OnscreenDisplayClient::SetMemoryPolicy(const ManagedMemoryPolicy& policy) {
surface_display_output_surface_->SetMemoryPolicy(policy);
}
-} // namespace content
+} // namespace cc
« 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