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

Unified Diff: content/renderer/gpu/compositor_output_surface.cc

Issue 11348371: cc: Move WebCompositorOutputSurface and related classes into cc/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: forlanding6 Created 8 years 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/renderer/gpu/compositor_output_surface.cc
diff --git a/content/renderer/gpu/compositor_output_surface.cc b/content/renderer/gpu/compositor_output_surface.cc
index 71a4be86987b3211753f5a6cdd872b10f8330b26..21eaf809cf4dd6ad64f1a1fd7958ed085ec52514 100644
--- a/content/renderer/gpu/compositor_output_surface.cc
+++ b/content/renderer/gpu/compositor_output_surface.cc
@@ -5,15 +5,15 @@
#include "content/renderer/gpu/compositor_output_surface.h"
#include "base/message_loop_proxy.h"
+#include "cc/output_surface_client.h"
#include "content/common/view_messages.h"
#include "content/renderer/render_thread_impl.h"
#include "ipc/ipc_forwarding_message_filter.h"
#include "ipc/ipc_sync_channel.h"
-#include "third_party/WebKit/Source/Platform/chromium/public/WebCompositorOutputSurfaceClient.h"
#include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3D.h"
+using cc::SoftwareOutputDevice;
using WebKit::WebGraphicsContext3D;
-using WebKit::WebCompositorSoftwareOutputDevice;
namespace content {
@@ -32,7 +32,7 @@ IPC::ForwardingMessageFilter* CompositorOutputSurface::CreateFilter(
CompositorOutputSurface::CompositorOutputSurface(
int32 routing_id,
WebGraphicsContext3D* context3D,
- WebCompositorSoftwareOutputDevice* software_device)
+ cc::SoftwareOutputDevice* software_device)
: output_surface_filter_(
RenderThreadImpl::current()->compositor_output_surface_filter()),
client_(NULL),
@@ -40,7 +40,7 @@ CompositorOutputSurface::CompositorOutputSurface(
context3D_(context3D),
software_device_(software_device) {
DCHECK(output_surface_filter_);
- capabilities_.hasParentCompositor = false;
+ capabilities_.has_parent_compositor = false;
DetachFromThread();
}
@@ -52,14 +52,14 @@ CompositorOutputSurface::~CompositorOutputSurface() {
output_surface_filter_->RemoveRoute(routing_id_);
}
-const WebKit::WebCompositorOutputSurface::Capabilities&
- CompositorOutputSurface::capabilities() const {
+const struct cc::OutputSurface::Capabilities&
+ CompositorOutputSurface::Capabilities() const {
DCHECK(CalledOnValidThread());
return capabilities_;
}
-bool CompositorOutputSurface::bindToClient(
- WebKit::WebCompositorOutputSurfaceClient* client) {
+bool CompositorOutputSurface::BindToClient(
+ cc::OutputSurfaceClient* client) {
DCHECK(CalledOnValidThread());
DCHECK(!client_);
if (context3D_.get()) {
@@ -78,18 +78,17 @@ bool CompositorOutputSurface::bindToClient(
return true;
}
-WebGraphicsContext3D* CompositorOutputSurface::context3D() const {
+WebGraphicsContext3D* CompositorOutputSurface::Context3D() const {
DCHECK(CalledOnValidThread());
return context3D_.get();
}
-WebCompositorSoftwareOutputDevice* CompositorOutputSurface::softwareDevice()
- const {
+cc::SoftwareOutputDevice* CompositorOutputSurface::SoftwareDevice() const {
return software_device_.get();
}
-void CompositorOutputSurface::sendFrameToParentCompositor(
- const WebKit::WebCompositorFrame&) {
+void CompositorOutputSurface::SendFrameToParentCompositor(
+ const cc::CompositorFrame&) {
DCHECK(CalledOnValidThread());
NOTREACHED();
}
@@ -104,15 +103,10 @@ void CompositorOutputSurface::OnMessageReceived(const IPC::Message& message) {
}
void CompositorOutputSurface::OnUpdateVSyncParameters(
- base::TimeTicks timebase,
- base::TimeDelta interval) {
+ base::TimeTicks timebase, base::TimeDelta interval) {
DCHECK(CalledOnValidThread());
DCHECK(client_);
- double monotonicTimebase = timebase.ToInternalValue() /
- static_cast<double>(base::Time::kMicrosecondsPerSecond);
- double intervalInSeconds = interval.ToInternalValue() /
- static_cast<double>(base::Time::kMicrosecondsPerSecond);
- client_->onVSyncParametersChanged(monotonicTimebase, intervalInSeconds);
+ client_->OnVSyncParametersChanged(timebase, interval);
}
} // namespace content
« no previous file with comments | « content/renderer/gpu/compositor_output_surface.h ('k') | content/renderer/gpu/compositor_software_output_device_gl_adapter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698