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

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: Made the RWHV API Android-only. 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 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 virtual void EnableVSyncNotification(bool enable) OVERRIDE;
54 55
55 // TODO(epenner): This seems out of place here and would be a better fit 56 // 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) 57 // int CompositorThread after it is fully refactored (http://crbug/170828)
57 virtual void UpdateSmoothnessTakesPriority(bool prefer_smoothness) OVERRIDE; 58 virtual void UpdateSmoothnessTakesPriority(bool prefer_smoothness) OVERRIDE;
58 59
59 protected: 60 protected:
60 virtual void OnSwapAck(const cc::CompositorFrameAck& ack); 61 virtual void OnSwapAck(const cc::CompositorFrameAck& ack);
61 62
62 private: 63 private:
63 class CompositorOutputSurfaceProxy : 64 class CompositorOutputSurfaceProxy :
(...skipping 12 matching lines...) Expand all
76 friend class base::RefCountedThreadSafe<CompositorOutputSurfaceProxy>; 77 friend class base::RefCountedThreadSafe<CompositorOutputSurfaceProxy>;
77 ~CompositorOutputSurfaceProxy() {} 78 ~CompositorOutputSurfaceProxy() {}
78 CompositorOutputSurface* output_surface_; 79 CompositorOutputSurface* output_surface_;
79 80
80 DISALLOW_COPY_AND_ASSIGN(CompositorOutputSurfaceProxy); 81 DISALLOW_COPY_AND_ASSIGN(CompositorOutputSurfaceProxy);
81 }; 82 };
82 83
83 void OnMessageReceived(const IPC::Message& message); 84 void OnMessageReceived(const IPC::Message& message);
84 void OnUpdateVSyncParameters( 85 void OnUpdateVSyncParameters(
85 base::TimeTicks timebase, base::TimeDelta interval); 86 base::TimeTicks timebase, base::TimeDelta interval);
87 void DidVSync(base::TimeTicks frame_time);
86 bool Send(IPC::Message* message); 88 bool Send(IPC::Message* message);
87 89
88 scoped_refptr<IPC::ForwardingMessageFilter> output_surface_filter_; 90 scoped_refptr<IPC::ForwardingMessageFilter> output_surface_filter_;
89 scoped_refptr<CompositorOutputSurfaceProxy> output_surface_proxy_; 91 scoped_refptr<CompositorOutputSurfaceProxy> output_surface_proxy_;
90 int routing_id_; 92 int routing_id_;
91 bool prefers_smoothness_; 93 bool prefers_smoothness_;
92 base::PlatformThreadId main_thread_id_; 94 base::PlatformThreadId main_thread_id_;
93 }; 95 };
94 96
95 } // namespace content 97 } // namespace content
96 98
97 #endif // CONTENT_RENDERER_GPU_COMPOSITOR_OUTPUT_SURFACE_H_ 99 #endif // CONTENT_RENDERER_GPU_COMPOSITOR_OUTPUT_SURFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698