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/browser/aura/software_browser_compositor_output_surface.h

Issue 57883007: Adding support for VSyncProvider to the software drawing path (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added unittests Created 7 years, 1 month 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_AURA_SOFTWARE_OUTPUT_SURFACE_H_ 5 #ifndef CONTENT_BROWSER_AURA_SOFTWARE_OUTPUT_SURFACE_H_
6 #define CONTENT_BROWSER_AURA_SOFTWARE_OUTPUT_SURFACE_H_ 6 #define CONTENT_BROWSER_AURA_SOFTWARE_OUTPUT_SURFACE_H_
7 7
8 #include "base/memory/weak_ptr.h"
8 #include "cc/output/output_surface.h" 9 #include "cc/output/output_surface.h"
10 #include "ui/compositor/compositor.h"
9 11
10 namespace cc { class SoftwareOutputDevice; } 12 namespace base {
13 class MessageLoopProxy;
14 }
15
16 namespace cc {
17 class SoftwareOutputDevice;
18 }
11 19
12 namespace content { 20 namespace content {
13 21
22 class VSyncListener;
23
14 // TODO(danakj): Inherit from BrowserCompositorOutputSurface to share stuff like 24 // TODO(danakj): Inherit from BrowserCompositorOutputSurface to share stuff like
15 // reflectors, when we split the GL-specific stuff out of the class. 25 // reflectors, when we split the GL-specific stuff out of the class.
16 class SoftwareBrowserCompositorOutputSurface : public cc::OutputSurface { 26 class SoftwareBrowserCompositorOutputSurface : public cc::OutputSurface {
17 public: 27 public:
18 static scoped_ptr<SoftwareBrowserCompositorOutputSurface> Create( 28 static scoped_ptr<SoftwareBrowserCompositorOutputSurface> Create(
19 scoped_ptr<cc::SoftwareOutputDevice> software_device) { 29 scoped_ptr<cc::SoftwareOutputDevice> software_device,
30 base::MessageLoopProxy* compositor_message_loop,
31 base::WeakPtr<ui::Compositor> compositor) {
20 return make_scoped_ptr( 32 return make_scoped_ptr(
21 new SoftwareBrowserCompositorOutputSurface(software_device.Pass())); 33 new SoftwareBrowserCompositorOutputSurface(software_device.Pass(),
34 compositor_message_loop,
35 compositor));
22 } 36 }
23 37
38 virtual ~SoftwareBrowserCompositorOutputSurface();
39
24 private: 40 private:
25 explicit SoftwareBrowserCompositorOutputSurface( 41 friend class VSyncListener;
26 scoped_ptr<cc::SoftwareOutputDevice> software_device); 42
43 SoftwareBrowserCompositorOutputSurface(
44 scoped_ptr<cc::SoftwareOutputDevice> software_device,
45 base::MessageLoopProxy* compositor_message_loop,
46 base::WeakPtr<ui::Compositor> compositor);
27 47
28 virtual void SwapBuffers(cc::CompositorFrame* frame) OVERRIDE; 48 virtual void SwapBuffers(cc::CompositorFrame* frame) OVERRIDE;
49
50 scoped_refptr<VSyncListener> vsync_listener_;
29 }; 51 };
30 52
31 } // namespace content 53 } // namespace content
32 54
33 #endif // CONTENT_BROWSER_AURA_SOFTWARE_OUTPUT_SURFACE_H_ 55 #endif // CONTENT_BROWSER_AURA_SOFTWARE_OUTPUT_SURFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698