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

Unified Diff: content/browser/aura/browser_compositor_output_surface_proxy.cc

Issue 140753005: Add the UI compositor to the Mac build (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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
Index: content/browser/aura/browser_compositor_output_surface_proxy.cc
diff --git a/content/browser/aura/browser_compositor_output_surface_proxy.cc b/content/browser/aura/browser_compositor_output_surface_proxy.cc
deleted file mode 100644
index e86e5b8c69c458af32b60bef84c669851096d564..0000000000000000000000000000000000000000
--- a/content/browser/aura/browser_compositor_output_surface_proxy.cc
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "content/browser/aura/browser_compositor_output_surface_proxy.h"
-
-#include "base/bind.h"
-#include "content/browser/aura/browser_compositor_output_surface.h"
-#include "content/browser/gpu/browser_gpu_channel_host_factory.h"
-#include "content/common/gpu/gpu_messages.h"
-
-namespace content {
-
-BrowserCompositorOutputSurfaceProxy::BrowserCompositorOutputSurfaceProxy(
- IDMap<BrowserCompositorOutputSurface>* surface_map)
- : surface_map_(surface_map),
- connected_to_gpu_process_host_id_(0) {}
-
-BrowserCompositorOutputSurfaceProxy::~BrowserCompositorOutputSurfaceProxy() {}
-
-void BrowserCompositorOutputSurfaceProxy::ConnectToGpuProcessHost(
- base::SingleThreadTaskRunner* compositor_thread_task_runner) {
- BrowserGpuChannelHostFactory* factory =
- BrowserGpuChannelHostFactory::instance();
-
- int gpu_process_host_id = factory->GpuProcessHostId();
- if (connected_to_gpu_process_host_id_ == gpu_process_host_id)
- return;
-
- const uint32 kMessagesToFilter[] = { GpuHostMsg_UpdateVSyncParameters::ID };
- factory->SetHandlerForControlMessages(
- kMessagesToFilter,
- arraysize(kMessagesToFilter),
- base::Bind(&BrowserCompositorOutputSurfaceProxy::
- OnMessageReceivedOnCompositorThread,
- this),
- compositor_thread_task_runner);
- connected_to_gpu_process_host_id_ = gpu_process_host_id;
-}
-
-void BrowserCompositorOutputSurfaceProxy::OnMessageReceivedOnCompositorThread(
- const IPC::Message& message) {
- IPC_BEGIN_MESSAGE_MAP(BrowserCompositorOutputSurfaceProxy, message)
- IPC_MESSAGE_HANDLER(GpuHostMsg_UpdateVSyncParameters,
- OnUpdateVSyncParametersOnCompositorThread);
- IPC_END_MESSAGE_MAP()
-}
-
-void
-BrowserCompositorOutputSurfaceProxy::OnUpdateVSyncParametersOnCompositorThread(
- int surface_id,
- base::TimeTicks timebase,
- base::TimeDelta interval) {
- BrowserCompositorOutputSurface* surface = surface_map_->Lookup(surface_id);
- if (surface)
- surface->OnUpdateVSyncParameters(timebase, interval);
-}
-} // namespace content
« no previous file with comments | « content/browser/aura/browser_compositor_output_surface_proxy.h ('k') | content/browser/aura/compositor_resize_lock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698