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