Gallery.app: Bring the removed line back to show mosaic view.
[chromium-blink-merge.git] / cc / output / overlay_candidate.h
blob9961bfdc83deb31582e9a2ad98a22ec7b4bdb886
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 "base/basictypes.h"
11 #include "cc/base/cc_export.h"
12 #include "cc/resources/resource_format.h"
13 #include "ui/gfx/geometry/rect.h"
14 #include "ui/gfx/overlay_transform.h"
15 #include "ui/gfx/transform.h"
17 namespace cc {
19 class CC_EXPORT OverlayCandidate {
20 public:
21 static gfx::OverlayTransform GetOverlayTransform(
22 const gfx::Transform& quad_transform,
23 bool flipped);
24 static gfx::Rect GetOverlayRect(const gfx::Transform& quad_transform,
25 const gfx::Rect& rect);
27 OverlayCandidate();
28 ~OverlayCandidate();
30 // Transformation to apply to layer during composition.
31 gfx::OverlayTransform transform;
32 // Format of the buffer to composite.
33 ResourceFormat format;
34 // Rect on the display to position the overlay to.
35 gfx::Rect display_rect;
36 // Crop within the buffer to be placed inside |display_rect|.
37 gfx::RectF uv_rect;
38 // Texture resource to present in an overlay.
39 unsigned resource_id;
40 // Stacking order of the overlay plane relative to the main surface,
41 // which is 0. Signed to allow for "underlays".
42 int plane_z_order;
44 // To be modified by the implementer if this candidate can go into
45 // an overlay.
46 bool overlay_handled;
49 typedef std::vector<OverlayCandidate> OverlayCandidateList;
51 } // namespace cc
53 #endif // CC_OUTPUT_OVERLAY_CANDIDATE_H_