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

Side by Side Diff: chromecast/public/osd_surface.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_SURFACE_H_
6 #define CHROMECAST_PUBLIC_OSD_SURFACE_H_
7
8 namespace chromecast {
9
10 struct Rect;
11 struct Size;
12
13 // Provides simple API (copy bitmap, blit, composite and fill) for drawing
14 // OSD graphics on OsdPlane. Hardware-specific implementation should be
15 // instantiated by OsdPlane.
16 class OsdSurface {
17 public:
18 struct Point {
19 Point(int arg_x, int arg_y) : x(arg_x), y(arg_y) {}
byungchul 2015/04/27 21:42:14 a blank line
halliwell 2015/04/27 22:17:33 Done.
20 const int x;
21 const int y;
22 };
23
24 virtual ~OsdSurface() {}
25
26 // Blits(fast copy) bitmap from a surface. Copies |src_rect| area of surface
27 // |dst_point| of this surface.
28 virtual void Blit(OsdSurface* src_surface,
29 const Rect& src_rect,
30 const Point& dst_point) = 0;
31
32 // Composites ARGB values of |src_surface| on top of this surface. It is NOT
33 // copy. Used when displaying OSD images on same plane.
34 virtual void Composite(OsdSurface* src_surface,
35 const Rect& src_rect,
36 const Point& dst_point) = 0;
37
38 // Copies |damage_rect| area of src bitmap into |dst_point| of this surface.
39 // It is similar to Blit() except that it accepts arbitrary bitmap pointer
40 // instead of surface.
41 virtual void CopyBitmap(char* src_bitmap,
42 const Rect& src_rect,
43 const Rect& damage_rect,
44 const Point& dst_point) = 0;
45
46 // Fills |rect| area of surface with |argb| value.
47 virtual void Fill(const Rect& rect, int argb) = 0;
48
49 // Returns the dimensions of the surface.
50 virtual const Size& size() const = 0;
51 };
52
53 } // namespace chromecast
54
55 #endif // CHROMECAST_PUBLIC_OSD_SURFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698