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

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: Fix some nits Created 5 years, 7 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
« no previous file with comments | « chromecast/public/osd_plane_shlib.h ('k') | ui/ozone/platform/cast/surface_factory_cast.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {}
20
21 const int x;
22 const int y;
23 };
24
25 virtual ~OsdSurface() {}
26
27 // Blits(fast copy) bitmap from a surface. Copies |src_rect| area of surface
28 // |dst_point| of this surface.
29 virtual void Blit(OsdSurface* src_surface,
30 const Rect& src_rect,
31 const Point& dst_point) = 0;
32
33 // Composites ARGB values of |src_surface| on top of this surface. It is NOT
34 // copy. Used when displaying OSD images on same plane.
35 virtual void Composite(OsdSurface* src_surface,
36 const Rect& src_rect,
37 const Point& dst_point) = 0;
38
39 // Copies |damage_rect| area of src bitmap into |dst_point| of this surface.
40 // It is similar to Blit() except that it accepts arbitrary bitmap pointer
41 // instead of surface.
42 virtual void CopyBitmap(char* src_bitmap,
43 const Rect& src_rect,
44 const Rect& damage_rect,
45 const Point& dst_point) = 0;
46
47 // Fills |rect| area of surface with |argb| value.
48 virtual void Fill(const Rect& rect, int argb) = 0;
49
50 // Returns the dimensions of the surface.
51 virtual const Size& size() const = 0;
52 };
53
54 } // namespace chromecast
55
56 #endif // CHROMECAST_PUBLIC_OSD_SURFACE_H_
OLDNEW
« no previous file with comments | « chromecast/public/osd_plane_shlib.h ('k') | ui/ozone/platform/cast/surface_factory_cast.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698