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

Side by Side Diff: content/browser/compositor/software_browser_compositor_output_surface.h

Issue 138903025: Read compositor VSync information from platform, when possible (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 287efe04 Rebase, oshima@ nits. Created 6 years, 10 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_BROWSER_COMPOSITOR_SOFTWARE_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ 5 #ifndef CONTENT_BROWSER_COMPOSITOR_SOFTWARE_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_
6 #define CONTENT_BROWSER_COMPOSITOR_SOFTWARE_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ 6 #define CONTENT_BROWSER_COMPOSITOR_SOFTWARE_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_
7 7
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "content/browser/compositor/browser_compositor_output_surface.h" 9 #include "content/browser/compositor/browser_compositor_output_surface.h"
10 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
11 #include "ui/compositor/compositor.h"
12
13 namespace base {
14 class MessageLoopProxy;
15 }
16 11
17 namespace cc { 12 namespace cc {
18 class SoftwareOutputDevice; 13 class SoftwareOutputDevice;
19 } 14 }
20 15
16 namespace ui {
17 class CompositorVSyncManager;
18 }
19
21 namespace content { 20 namespace content {
22 21
23 class BrowserCompositorOutputSurfaceProxy; 22 class BrowserCompositorOutputSurfaceProxy;
24 23
25 class CONTENT_EXPORT SoftwareBrowserCompositorOutputSurface 24 class CONTENT_EXPORT SoftwareBrowserCompositorOutputSurface
26 : public BrowserCompositorOutputSurface { 25 : public BrowserCompositorOutputSurface {
27 public: 26 public:
28 SoftwareBrowserCompositorOutputSurface( 27 SoftwareBrowserCompositorOutputSurface(
29 scoped_refptr<BrowserCompositorOutputSurfaceProxy> surface_proxy, 28 scoped_refptr<BrowserCompositorOutputSurfaceProxy> surface_proxy,
30 scoped_ptr<cc::SoftwareOutputDevice> software_device, 29 scoped_ptr<cc::SoftwareOutputDevice> software_device,
31 int surface_id, 30 int surface_id,
32 IDMap<BrowserCompositorOutputSurface>* output_surface_map, 31 IDMap<BrowserCompositorOutputSurface>* output_surface_map,
33 base::MessageLoopProxy* compositor_message_loop, 32 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager);
34 base::WeakPtr<ui::Compositor> compositor);
35 33
36 virtual ~SoftwareBrowserCompositorOutputSurface(); 34 virtual ~SoftwareBrowserCompositorOutputSurface();
37 35
38 private: 36 private:
39 virtual void SwapBuffers(cc::CompositorFrame* frame) OVERRIDE; 37 virtual void SwapBuffers(cc::CompositorFrame* frame) OVERRIDE;
40 38
41 // On the software path we need to explicitly call the proxy to update the 39 // On the software path we need to explicitly call the proxy to update the
42 // VSync parameters. 40 // VSync parameters.
43 scoped_refptr<BrowserCompositorOutputSurfaceProxy> output_surface_proxy_; 41 scoped_refptr<BrowserCompositorOutputSurfaceProxy> output_surface_proxy_;
44 42
45 DISALLOW_COPY_AND_ASSIGN(SoftwareBrowserCompositorOutputSurface); 43 DISALLOW_COPY_AND_ASSIGN(SoftwareBrowserCompositorOutputSurface);
46 }; 44 };
47 45
48 } // namespace content 46 } // namespace content
49 47
50 #endif // CONTENT_BROWSER_COMPOSITOR_SOFTWARE_BROWSER_COMPOSITOR_OUTPUT_SURFACE _H_ 48 #endif // CONTENT_BROWSER_COMPOSITOR_SOFTWARE_BROWSER_COMPOSITOR_OUTPUT_SURFACE _H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698