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

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

Issue 10798006: Implement WebCompositorOutputSurface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more fixes Created 8 years, 4 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 | « content/content_renderer.gypi ('k') | content/renderer/gpu/compositor_output_surface.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/gpu/compositor_output_surface.h
diff --git a/content/renderer/gpu/compositor_output_surface.h b/content/renderer/gpu/compositor_output_surface.h
new file mode 100644
index 0000000000000000000000000000000000000000..3f4ed8837d989af14c3b495e3fc7c60207f3d4ff
--- /dev/null
+++ b/content/renderer/gpu/compositor_output_surface.h
@@ -0,0 +1,60 @@
+// Copyright (c) 2012 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.
+
+#ifndef CONTENT_RENDERER_GPU_COMPOSITOR_OUTPUT_SURFACE_H_
+#define CONTENT_RENDERER_GPU_COMPOSITOR_OUTPUT_SURFACE_H_
+
+#include "base/basictypes.h"
+#include "base/compiler_specific.h"
+#include "base/memory/scoped_ptr.h"
+#include "base/memory/ref_counted.h"
+#include "base/threading/non_thread_safe.h"
+#include "base/time.h"
+#include "third_party/WebKit/Source/Platform/chromium/public/WebCompositorOutputSurface.h"
+
+namespace base {
+ class TaskRunner;
+}
+
+namespace IPC {
+ class ForwardingMessageFilter;
+ class Message;
+ class SyncChannel;
+}
+
+// This class can be created only on the main thread, but then becomes pinned
+// to a fixed thread when bindToClient is called.
+class CompositorOutputSurface
+ : NON_EXPORTED_BASE(public WebKit::WebCompositorOutputSurface)
+ , NON_EXPORTED_BASE(public base::NonThreadSafe) {
+ public:
+ static IPC::ForwardingMessageFilter* CreateFilter(
+ base::TaskRunner* target_task_runner);
+
+ CompositorOutputSurface(int32 routing_id,
+ WebKit::WebGraphicsContext3D* context3d);
+ virtual ~CompositorOutputSurface();
+
+ // WebCompositorOutputSurface implementation.
+ virtual bool bindToClient(
+ WebKit::WebCompositorOutputSurfaceClient* client) OVERRIDE;
+ virtual const Capabilities& capabilities() const OVERRIDE;
+ virtual WebKit::WebGraphicsContext3D* context3D() const OVERRIDE;
+ virtual void sendFrameToParentCompositor(
+ const WebKit::WebCompositorFrame&) OVERRIDE;
+
+ private:
+ void OnMessageReceived(const IPC::Message& message);
+ void OnUpdateVSyncParameters(
+ base::TimeTicks timebase, base::TimeDelta interval);
+
+ scoped_refptr<IPC::ForwardingMessageFilter> output_surface_filter_;
+ WebKit::WebCompositorOutputSurfaceClient* client_;
+ int routing_id_;
+ Capabilities capabilities_;
+ scoped_ptr<WebKit::WebGraphicsContext3D> context3D_;
+};
+
+#endif // CONTENT_RENDERER_GPU_COMPOSITOR_OUTPUT_SURFACE_H_
+
« no previous file with comments | « content/content_renderer.gypi ('k') | content/renderer/gpu/compositor_output_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698