Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / cc / layers / render_surface_draw_properties.h
blobf648909a81d9bc763e85bcdfcf21b9b9a3ee2a2e
1 // Copyright 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.
5 #ifndef CC_LAYERS_RENDER_SURFACE_DRAW_PROPERTIES_H_
6 #define CC_LAYERS_RENDER_SURFACE_DRAW_PROPERTIES_H_
8 #include "cc/base/cc_export.h"
9 #include "ui/gfx/geometry/rect.h"
10 #include "ui/gfx/transform.h"
12 namespace cc {
14 // Container for properties that render surfaces need to compute before they can
15 // be drawn.
16 struct CC_EXPORT RenderSurfaceDrawProperties {
17 RenderSurfaceDrawProperties();
18 ~RenderSurfaceDrawProperties();
20 float draw_opacity;
22 // Transforms from the surface's own space to the space of its target surface.
23 gfx::Transform draw_transform;
25 // Transforms from the surface's own space to the viewport.
26 gfx::Transform screen_space_transform;
28 // If the surface has a replica, these transform from the replica's space to
29 // the space of the target surface and the viewport.
30 gfx::Transform replica_draw_transform;
31 gfx::Transform replica_screen_space_transform;
33 // This is in the surface's own space.
34 gfx::Rect content_rect;
36 // This is in the space of the surface's target surface.
37 gfx::Rect clip_rect;
39 // True if the surface needs to be clipped by clip_rect.
40 bool is_clipped;
43 } // namespace cc
45 #endif // CC_LAYERS_RENDER_SURFACE_DRAW_PROPERTIES_H_