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

Side by Side Diff: chromecast/public/osd_plane.h

Issue 1104853002: Adds public API and loads Cast OSD plane implementation from shared lib (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Combined small types in one header plus some nits Created 5 years, 8 months 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
OLDNEW
(Empty)
1 // Copyright (c) 2015 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 CHROMECAST_PUBLIC_OSD_PLANE_H_
6 #define CHROMECAST_PUBLIC_OSD_PLANE_H_
7
8 namespace chromecast {
9
10 class OsdSurface;
11 struct Rect;
12 struct Size;
13
14 // Abstract graphics plane for OSD, to be implemented in platform-specific way.
15 // Platform must composite this plane on top of main (GL-based) graphics plane.
16 class OsdPlane {
17 public:
18 virtual ~OsdPlane() {}
19
20 // Creates a surface for offscreen drawing.
21 virtual OsdSurface* CreateSurface(const Size& size) = 0;
22
23 // Sets a clip rectangle, client should call before drawing to back buffer
24 // to specify the area they intend to draw on. Platforms may reduce memory
25 // usage by only allocating back buffer to cover this area. Areas outside
26 // clip rectangle must display as fully transparent. In particular, setting
27 // an empty clip rectangle and calling Flip should clear the plane.
28 virtual void SetClipRectangle(const Rect& rect) = 0;
29
30 // Gets the current back buffer surface. Valid until next call to Flip or
31 // SetClipRectangle.
32 virtual OsdSurface* GetBackBuffer() = 0;
33
34 // Presents current back buffer to screen.
35 virtual void Flip() = 0;
36 };
37
38 } // namespace chromecast
39
40 #endif // CHROMECAST_PUBLIC_OSD_PLANE_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698