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

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

Issue 13068002: Send vsync notification from browser to renderer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move ifdef'd messages to the end. 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
« no previous file with comments | « content/common/view_messages.h ('k') | content/renderer/gpu/compositor_output_surface.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 CompositorOutputSurface(int32 routing_id, 44 CompositorOutputSurface(int32 routing_id,
45 WebGraphicsContext3DCommandBufferImpl* context3d, 45 WebGraphicsContext3DCommandBufferImpl* context3d,
46 cc::SoftwareOutputDevice* software); 46 cc::SoftwareOutputDevice* software);
47 virtual ~CompositorOutputSurface(); 47 virtual ~CompositorOutputSurface();
48 48
49 // cc::OutputSurface implementation. 49 // cc::OutputSurface implementation.
50 virtual bool BindToClient(cc::OutputSurfaceClient* client) OVERRIDE; 50 virtual bool BindToClient(cc::OutputSurfaceClient* client) OVERRIDE;
51 virtual void SendFrameToParentCompositor(cc::CompositorFrame*) OVERRIDE; 51 virtual void SendFrameToParentCompositor(cc::CompositorFrame*) OVERRIDE;
52 virtual void PostSubBuffer(gfx::Rect rect, const cc::LatencyInfo&) OVERRIDE; 52 virtual void PostSubBuffer(gfx::Rect rect, const cc::LatencyInfo&) OVERRIDE;
53 virtual void SwapBuffers(const cc::LatencyInfo&) OVERRIDE; 53 virtual void SwapBuffers(const cc::LatencyInfo&) OVERRIDE;
54 #if defined(OS_ANDROID)
55 virtual void EnableVSyncNotification(bool enable) OVERRIDE;
56 #endif
54 57
55 // TODO(epenner): This seems out of place here and would be a better fit 58 // TODO(epenner): This seems out of place here and would be a better fit
56 // int CompositorThread after it is fully refactored (http://crbug/170828) 59 // int CompositorThread after it is fully refactored (http://crbug/170828)
57 virtual void UpdateSmoothnessTakesPriority(bool prefer_smoothness) OVERRIDE; 60 virtual void UpdateSmoothnessTakesPriority(bool prefer_smoothness) OVERRIDE;
58 61
59 protected: 62 protected:
60 virtual void OnSwapAck(const cc::CompositorFrameAck& ack); 63 virtual void OnSwapAck(const cc::CompositorFrameAck& ack);
61 64
62 private: 65 private:
63 class CompositorOutputSurfaceProxy : 66 class CompositorOutputSurfaceProxy :
(...skipping 12 matching lines...) Expand all
76 friend class base::RefCountedThreadSafe<CompositorOutputSurfaceProxy>; 79 friend class base::RefCountedThreadSafe<CompositorOutputSurfaceProxy>;
77 ~CompositorOutputSurfaceProxy() {} 80 ~CompositorOutputSurfaceProxy() {}
78 CompositorOutputSurface* output_surface_; 81 CompositorOutputSurface* output_surface_;
79 82
80 DISALLOW_COPY_AND_ASSIGN(CompositorOutputSurfaceProxy); 83 DISALLOW_COPY_AND_ASSIGN(CompositorOutputSurfaceProxy);
81 }; 84 };
82 85
83 void OnMessageReceived(const IPC::Message& message); 86 void OnMessageReceived(const IPC::Message& message);
84 void OnUpdateVSyncParameters( 87 void OnUpdateVSyncParameters(
85 base::TimeTicks timebase, base::TimeDelta interval); 88 base::TimeTicks timebase, base::TimeDelta interval);
89 #if defined(OS_ANDROID)
90 void OnDidVSync(base::TimeTicks frame_time);
91 #endif
86 bool Send(IPC::Message* message); 92 bool Send(IPC::Message* message);
87 93
88 scoped_refptr<IPC::ForwardingMessageFilter> output_surface_filter_; 94 scoped_refptr<IPC::ForwardingMessageFilter> output_surface_filter_;
89 scoped_refptr<CompositorOutputSurfaceProxy> output_surface_proxy_; 95 scoped_refptr<CompositorOutputSurfaceProxy> output_surface_proxy_;
90 int routing_id_; 96 int routing_id_;
91 bool prefers_smoothness_; 97 bool prefers_smoothness_;
92 base::PlatformThreadId main_thread_id_; 98 base::PlatformThreadId main_thread_id_;
93 }; 99 };
94 100
95 } // namespace content 101 } // namespace content
96 102
97 #endif // CONTENT_RENDERER_GPU_COMPOSITOR_OUTPUT_SURFACE_H_ 103 #endif // CONTENT_RENDERER_GPU_COMPOSITOR_OUTPUT_SURFACE_H_
OLDNEW
« no previous file with comments | « content/common/view_messages.h ('k') | content/renderer/gpu/compositor_output_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698