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

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 12 matching lines...) Expand all
23 class Message; 23 class Message;
24 } 24 }
25 25
26 namespace cc { 26 namespace cc {
27 class CompositorFrame; 27 class CompositorFrame;
28 class CompositorFrameAck; 28 class CompositorFrameAck;
29 } 29 }
30 30
31 namespace content { 31 namespace content {
32 32
33 class WebGraphicsContext3DCommandBufferImpl;
34
33 // This class can be created only on the main thread, but then becomes pinned 35 // This class can be created only on the main thread, but then becomes pinned
34 // to a fixed thread when bindToClient is called. 36 // to a fixed thread when bindToClient is called.
35 class CompositorOutputSurface 37 class CompositorOutputSurface
36 : NON_EXPORTED_BASE(public cc::OutputSurface), 38 : NON_EXPORTED_BASE(public cc::OutputSurface),
37 NON_EXPORTED_BASE(public base::NonThreadSafe) { 39 NON_EXPORTED_BASE(public base::NonThreadSafe) {
38 public: 40 public:
39 static IPC::ForwardingMessageFilter* CreateFilter( 41 static IPC::ForwardingMessageFilter* CreateFilter(
40 base::TaskRunner* target_task_runner); 42 base::TaskRunner* target_task_runner);
41 43
42 CompositorOutputSurface(int32 routing_id, 44 CompositorOutputSurface(int32 routing_id,
43 WebKit::WebGraphicsContext3D* context3d, 45 WebGraphicsContext3DCommandBufferImpl* context3d,
44 cc::SoftwareOutputDevice* software); 46 cc::SoftwareOutputDevice* software);
45 virtual ~CompositorOutputSurface(); 47 virtual ~CompositorOutputSurface();
46 48
47 // cc::OutputSurface implementation. 49 // cc::OutputSurface implementation.
48 virtual bool BindToClient(cc::OutputSurfaceClient* client) OVERRIDE; 50 virtual bool BindToClient(cc::OutputSurfaceClient* client) OVERRIDE;
49 virtual void SendFrameToParentCompositor(cc::CompositorFrame*) OVERRIDE; 51 virtual void SendFrameToParentCompositor(cc::CompositorFrame*) OVERRIDE;
52 virtual void PostSubBuffer(gfx::Rect rect, const cc::LatencyInfo&) OVERRIDE;
53 virtual void SwapBuffers(const cc::LatencyInfo&) OVERRIDE;
50 54
51 // TODO(epenner): This seems out of place here and would be a better fit 55 // TODO(epenner): This seems out of place here and would be a better fit
52 // int CompositorThread after it is fully refactored (http://crbug/170828) 56 // int CompositorThread after it is fully refactored (http://crbug/170828)
53 virtual void UpdateSmoothnessTakesPriority(bool prefer_smoothness) OVERRIDE; 57 virtual void UpdateSmoothnessTakesPriority(bool prefer_smoothness) OVERRIDE;
54 58
55 protected: 59 protected:
56 virtual void OnSwapAck(const cc::CompositorFrameAck& ack); 60 virtual void OnSwapAck(const cc::CompositorFrameAck& ack);
57 61
58 private: 62 private:
59 class CompositorOutputSurfaceProxy : 63 class CompositorOutputSurfaceProxy :
(...skipping 24 matching lines...) Expand all
84 scoped_refptr<IPC::ForwardingMessageFilter> output_surface_filter_; 88 scoped_refptr<IPC::ForwardingMessageFilter> output_surface_filter_;
85 scoped_refptr<CompositorOutputSurfaceProxy> output_surface_proxy_; 89 scoped_refptr<CompositorOutputSurfaceProxy> output_surface_proxy_;
86 int routing_id_; 90 int routing_id_;
87 bool prefers_smoothness_; 91 bool prefers_smoothness_;
88 base::PlatformThreadId main_thread_id_; 92 base::PlatformThreadId main_thread_id_;
89 }; 93 };
90 94
91 } // namespace content 95 } // namespace content
92 96
93 #endif // CONTENT_RENDERER_GPU_COMPOSITOR_OUTPUT_SURFACE_H_ 97 #endif // CONTENT_RENDERER_GPU_COMPOSITOR_OUTPUT_SURFACE_H_
OLDNEW
« no previous file with comments | « content/common/gpu/texture_image_transport_surface.cc ('k') | content/renderer/gpu/compositor_output_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698