Add ICU message format support
[chromium-blink-merge.git] / cc / output / overlay_candidate.h
blobb3e7fb359f19e4b7e6a1d15ace9f5cc3046c97c9
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 CC_OUTPUT_OVERLAY_CANDIDATE_H_
6 #define CC_OUTPUT_OVERLAY_CANDIDATE_H_
8 #include <vector>
10 #include "cc/base/cc_export.h"
11 #include "cc/resources/resource_format.h"
12 #include "ui/gfx/geometry/rect.h"
13 #include "ui/gfx/overlay_transform.h"
14 #include "ui/gfx/transform.h"
16 namespace cc {
18 class CC_EXPORT OverlayCandidate {
19 public:
20 static gfx::OverlayTransform GetOverlayTransform(
21 const gfx::Transform& quad_transform,
22 bool y_flipped);
23 // Apply transform |delta| to |in| and return the resulting transform,
24 // or OVERLAY_TRANSFORM_INVALID.
25 static gfx::OverlayTransform ModifyTransform(gfx::OverlayTransform in,
26 gfx::OverlayTransform delta);
27 static gfx::RectF GetOverlayRect(const gfx::Transform& quad_transform,
28 const gfx::Rect& rect);
30 OverlayCandidate();
31 ~OverlayCandidate();
33 // Transformation to apply to layer during composition.
34 gfx::OverlayTransform transform;
35 // Format of the buffer to composite.
36 ResourceFormat format;
37 // Size of the resource, in pixels.
38 gfx::Size resource_size_in_pixels;
39 // Rect on the display to position the overlay to. Implementer must convert
40 // to integer coordinates if setting |overlay_handled| to true.
41 gfx::RectF display_rect;
42 // Crop within the buffer to be placed inside |display_rect|.
43 gfx::RectF uv_rect;
44 // Texture resource to present in an overlay.
45 unsigned resource_id;
46 // Stacking order of the overlay plane relative to the main surface,
47 // which is 0. Signed to allow for "underlays".
48 int plane_z_order;
50 // To be modified by the implementer if this candidate can go into
51 // an overlay.
52 bool overlay_handled;
55 typedef std::vector<OverlayCandidate> OverlayCandidateList;
57 } // namespace cc
59 #endif // CC_OUTPUT_OVERLAY_CANDIDATE_H_