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

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: Use BrowserCompositorOutputSurface as base class 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_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_
6 #define CONTENT_BROWSER_AURA_SOFTWARE_OUTPUT_SURFACE_H_ 6 #define CONTENT_BROWSER_AURA_SOFTWARE_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_
7 7
8 #include "cc/output/output_surface.h" 8 #include "base/memory/weak_ptr.h"
9 #include "content/browser/aura/browser_compositor_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
14 // TODO(danakj): Inherit from BrowserCompositorOutputSurface to share stuff like 22 class BrowserCompositorOutputSurfaceProxy;
15 // reflectors, when we split the GL-specific stuff out of the class. 23
16 class SoftwareBrowserCompositorOutputSurface : public cc::OutputSurface { 24 class SoftwareBrowserCompositorOutputSurface
25 : public BrowserCompositorOutputSurface {
17 public: 26 public:
18 static scoped_ptr<SoftwareBrowserCompositorOutputSurface> Create( 27 SoftwareBrowserCompositorOutputSurface(
19 scoped_ptr<cc::SoftwareOutputDevice> software_device) { 28 scoped_refptr<BrowserCompositorOutputSurfaceProxy> surface_proxy,
20 return make_scoped_ptr( 29 scoped_ptr<cc::SoftwareOutputDevice> software_device,
21 new SoftwareBrowserCompositorOutputSurface(software_device.Pass())); 30 int surface_id,
22 } 31 IDMap<BrowserCompositorOutputSurface>* output_surface_map,
32 base::MessageLoopProxy* compositor_message_loop,
33 base::WeakPtr<ui::Compositor> compositor);
34
35 virtual ~SoftwareBrowserCompositorOutputSurface();
23 36
24 private: 37 private:
25 explicit SoftwareBrowserCompositorOutputSurface( 38 virtual void SwapBuffers(cc::CompositorFrame* frame) OVERRIDE;
26 scoped_ptr<cc::SoftwareOutputDevice> software_device);
27 39
28 virtual void SwapBuffers(cc::CompositorFrame* frame) OVERRIDE; 40 // On the software path we need to explicitly call the proxy to update the
41 // VSync parameters.
42 scoped_refptr<BrowserCompositorOutputSurfaceProxy> output_surface_proxy_;
29 }; 43 };
30 44
31 } // namespace content 45 } // namespace content
32 46
33 #endif // CONTENT_BROWSER_AURA_SOFTWARE_OUTPUT_SURFACE_H_ 47 #endif // CONTENT_BROWSER_AURA_SOFTWARE_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698