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.
5 #ifndef CONTENT_BROWSER_COMPOSITOR_ONSCREEN_DISPLAY_CLIENT_H_
6 #define CONTENT_BROWSER_COMPOSITOR_ONSCREEN_DISPLAY_CLIENT_H_
8 #include "cc/surfaces/display_client.h"
10 #include "base/memory/ref_counted.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "cc/surfaces/display.h"
15 class ContextProvider
;
21 // This class provides a DisplayClient implementation for drawing directly to an
23 class OnscreenDisplayClient
: cc::DisplayClient
{
25 OnscreenDisplayClient(
26 const scoped_refptr
<cc::ContextProvider
>& onscreen_context_provider
,
27 scoped_ptr
<cc::OutputSurface
> software_surface
,
28 cc::SurfaceManager
* manager
);
29 virtual ~OnscreenDisplayClient();
31 cc::Display
* display() { return &display_
; }
33 // cc::DisplayClient implementation.
34 virtual scoped_ptr
<cc::OutputSurface
> CreateOutputSurface() OVERRIDE
;
37 scoped_refptr
<cc::ContextProvider
> onscreen_context_provider_
;
38 scoped_ptr
<cc::OutputSurface
> software_surface_
;
41 DISALLOW_COPY_AND_ASSIGN(OnscreenDisplayClient
);
44 } // namespace content
46 #endif // CONTENT_BROWSER_COMPOSITOR_ONSCREEN_DISPLAY_CLIENT_H_