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

Side by Side Diff: content/renderer/gpu/compositor_output_surface.h

Issue 12614013: Plumb cc::LatencyInfo through command buffer and output surface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_RENDERER_GPU_COMPOSITOR_OUTPUT_SURFACE_H_ 5 #ifndef CONTENT_RENDERER_GPU_COMPOSITOR_OUTPUT_SURFACE_H_
6 #define CONTENT_RENDERER_GPU_COMPOSITOR_OUTPUT_SURFACE_H_ 6 #define CONTENT_RENDERER_GPU_COMPOSITOR_OUTPUT_SURFACE_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 11 matching lines...) Expand all
22 class ForwardingMessageFilter; 22 class ForwardingMessageFilter;
23 class Message; 23 class Message;
24 } 24 }
25 25
26 namespace cc { 26 namespace cc {
27 class CompositorFrameAck; 27 class CompositorFrameAck;
28 } 28 }
29 29
30 namespace content { 30 namespace content {
31 31
32 class WebGraphicsContext3DCommandBufferImpl;
33
32 // This class can be created only on the main thread, but then becomes pinned 34 // This class can be created only on the main thread, but then becomes pinned
33 // to a fixed thread when bindToClient is called. 35 // to a fixed thread when bindToClient is called.
34 class CompositorOutputSurface 36 class CompositorOutputSurface
35 : NON_EXPORTED_BASE(public cc::OutputSurface), 37 : NON_EXPORTED_BASE(public cc::OutputSurface),
36 NON_EXPORTED_BASE(public base::NonThreadSafe) { 38 NON_EXPORTED_BASE(public base::NonThreadSafe) {
37 public: 39 public:
38 static IPC::ForwardingMessageFilter* CreateFilter( 40 static IPC::ForwardingMessageFilter* CreateFilter(
39 base::TaskRunner* target_task_runner); 41 base::TaskRunner* target_task_runner);
40 42
41 CompositorOutputSurface(int32 routing_id, 43 CompositorOutputSurface(int32 routing_id,
42 WebKit::WebGraphicsContext3D* context3d, 44 WebGraphicsContext3DCommandBufferImpl* context3d,
43 cc::SoftwareOutputDevice* software); 45 cc::SoftwareOutputDevice* software);
44 virtual ~CompositorOutputSurface(); 46 virtual ~CompositorOutputSurface();
45 47
46 // cc::OutputSurface implementation. 48 // cc::OutputSurface implementation.
47 virtual bool BindToClient(cc::OutputSurfaceClient* client) OVERRIDE; 49 virtual bool BindToClient(cc::OutputSurfaceClient* client) OVERRIDE;
48 virtual void SendFrameToParentCompositor(cc::CompositorFrame*) OVERRIDE; 50 virtual void SendFrameToParentCompositor(cc::CompositorFrame*) OVERRIDE;
51 virtual void PostSubBuffer(gfx::Rect rect, const cc::LatencyInfo&) OVERRIDE;
52 virtual void SwapBuffers(const cc::LatencyInfo&) OVERRIDE;
49 53
50 // TODO(epenner): This seems out of place here and would be a better fit 54 // TODO(epenner): This seems out of place here and would be a better fit
51 // int CompositorThread after it is fully refactored (http://crbug/170828) 55 // int CompositorThread after it is fully refactored (http://crbug/170828)
52 virtual void UpdateSmoothnessTakesPriority(bool prefer_smoothness) OVERRIDE; 56 virtual void UpdateSmoothnessTakesPriority(bool prefer_smoothness) OVERRIDE;
53 57
54 protected: 58 protected:
55 virtual void OnSwapAck(const cc::CompositorFrameAck& ack); 59 virtual void OnSwapAck(const cc::CompositorFrameAck& ack);
56 60
57 private: 61 private:
58 class CompositorOutputSurfaceProxy : 62 class CompositorOutputSurfaceProxy :
(...skipping 24 matching lines...) Expand all
83 scoped_refptr<IPC::ForwardingMessageFilter> output_surface_filter_; 87 scoped_refptr<IPC::ForwardingMessageFilter> output_surface_filter_;
84 scoped_refptr<CompositorOutputSurfaceProxy> output_surface_proxy_; 88 scoped_refptr<CompositorOutputSurfaceProxy> output_surface_proxy_;
85 int routing_id_; 89 int routing_id_;
86 bool prefers_smoothness_; 90 bool prefers_smoothness_;
87 base::PlatformThreadId main_thread_id_; 91 base::PlatformThreadId main_thread_id_;
88 }; 92 };
89 93
90 } // namespace content 94 } // namespace content
91 95
92 #endif // CONTENT_RENDERER_GPU_COMPOSITOR_OUTPUT_SURFACE_H_ 96 #endif // CONTENT_RENDERER_GPU_COMPOSITOR_OUTPUT_SURFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698