OLD | NEW |
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_ONSCREEN_DISPLAY_CLIENT_H_ | 5 #ifndef CONTENT_BROWSER_COMPOSITOR_ONSCREEN_DISPLAY_CLIENT_H_ |
6 #define CONTENT_BROWSER_COMPOSITOR_ONSCREEN_DISPLAY_CLIENT_H_ | 6 #define CONTENT_BROWSER_COMPOSITOR_ONSCREEN_DISPLAY_CLIENT_H_ |
7 | 7 |
8 #include "cc/surfaces/display_client.h" | 8 #include "cc/surfaces/display_client.h" |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "cc/surfaces/display.h" | 12 #include "cc/surfaces/display.h" |
13 | 13 |
14 namespace cc { | 14 namespace cc { |
15 class ContextProvider; | 15 class ContextProvider; |
16 class SurfaceManager; | 16 class SurfaceManager; |
17 } | 17 } |
18 | 18 |
19 namespace content { | 19 namespace content { |
20 | 20 |
21 // This class provides a DisplayClient implementation for drawing directly to an | 21 // This class provides a DisplayClient implementation for drawing directly to an |
22 // onscreen context. | 22 // onscreen context. |
23 class OnscreenDisplayClient : cc::DisplayClient { | 23 class OnscreenDisplayClient : cc::DisplayClient { |
24 public: | 24 public: |
25 OnscreenDisplayClient( | 25 OnscreenDisplayClient( |
26 const scoped_refptr<cc::ContextProvider>& onscreen_context_provider, | 26 const scoped_refptr<cc::ContextProvider>& onscreen_context_provider, |
| 27 scoped_ptr<cc::OutputSurface> software_surface, |
27 cc::SurfaceManager* manager); | 28 cc::SurfaceManager* manager); |
28 virtual ~OnscreenDisplayClient(); | 29 virtual ~OnscreenDisplayClient(); |
29 | 30 |
30 cc::Display* display() { return &display_; } | 31 cc::Display* display() { return &display_; } |
31 | 32 |
32 // cc::DisplayClient implementation. | 33 // cc::DisplayClient implementation. |
33 virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface() OVERRIDE; | 34 virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface() OVERRIDE; |
34 | 35 |
35 private: | 36 private: |
36 scoped_refptr<cc::ContextProvider> onscreen_context_provider_; | 37 scoped_refptr<cc::ContextProvider> onscreen_context_provider_; |
| 38 scoped_ptr<cc::OutputSurface> software_surface_; |
37 cc::Display display_; | 39 cc::Display display_; |
38 | 40 |
39 DISALLOW_COPY_AND_ASSIGN(OnscreenDisplayClient); | 41 DISALLOW_COPY_AND_ASSIGN(OnscreenDisplayClient); |
40 }; | 42 }; |
41 | 43 |
42 } // namespace content | 44 } // namespace content |
43 | 45 |
44 #endif // CONTENT_BROWSER_COMPOSITOR_ONSCREEN_DISPLAY_CLIENT_H_ | 46 #endif // CONTENT_BROWSER_COMPOSITOR_ONSCREEN_DISPLAY_CLIENT_H_ |
OLD | NEW |