Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CONTENT_RENDERER_GPU_COMPOSITOR_OUTPUT_SURFACE_H_ | |
| 6 #define CONTENT_RENDERER_GPU_COMPOSITOR_OUTPUT_SURFACE_H_ | |
| 7 | |
| 8 #include "base/basictypes.h" | |
| 9 #include "base/compiler_specific.h" | |
| 10 #include "base/memory/scoped_ptr.h" | |
| 11 #include "base/memory/ref_counted.h" | |
| 12 #include "base/time.h" | |
| 13 #include "third_party/WebKit/Source/Platform/chromium/public/WebCompositorOutput Surface.h" | |
| 14 | |
| 15 namespace base { | |
| 16 class TaskRunner; | |
| 17 } | |
| 18 | |
| 19 namespace IPC { | |
| 20 class ForwardingMessageFilter; | |
| 21 class Message; | |
| 22 class SyncChannel; | |
| 23 } | |
| 24 | |
| 25 class CompositorOutputSurface : public WebKit::WebCompositorOutputSurface { | |
|
piman
2012/08/08 16:47:43
Can we add a quick comment that this class is crea
| |
| 26 public: | |
| 27 static IPC::ForwardingMessageFilter* CreateFilter( | |
| 28 base::TaskRunner* target_task_runner); | |
| 29 | |
| 30 CompositorOutputSurface(int32 routing_id, | |
| 31 WebKit::WebGraphicsContext3D* context3d); | |
| 32 virtual ~CompositorOutputSurface(); | |
| 33 | |
| 34 // WebCompositorOutputSurface implementation. | |
| 35 virtual bool bindToClient( | |
| 36 WebKit::WebCompositorOutputSurfaceClient* client) OVERRIDE; | |
| 37 virtual const Capabilities& capabilities() const OVERRIDE; | |
| 38 virtual WebKit::WebGraphicsContext3D* context3D() const OVERRIDE; | |
| 39 virtual void sendFrameToParentCompositor( | |
| 40 const WebKit::WebCompositorFrame&) OVERRIDE; | |
| 41 | |
| 42 private: | |
| 43 void OnMessageReceived(const IPC::Message& message); | |
| 44 void OnUpdateVSyncParameters( | |
| 45 base::TimeTicks timebase, base::TimeDelta interval); | |
| 46 | |
| 47 scoped_refptr<IPC::ForwardingMessageFilter> output_surface_filter_; | |
| 48 WebKit::WebCompositorOutputSurfaceClient* client_; | |
| 49 int routing_id_; | |
| 50 Capabilities capabilities_; | |
| 51 scoped_ptr<WebKit::WebGraphicsContext3D> context3D_; | |
| 52 }; | |
| 53 | |
| 54 #endif // CONTENT_RENDERER_GPU_COMPOSITOR_OUTPUT_SURFACE_H_ | |
| 55 | |
| OLD | NEW |