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

Unified Diff: cc/layers/render_surface_draw_properties.h

Issue 1310283002: cc: Avoid duplicate work when computing draw properties using property trees (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move RenderSurfaceDrawProperties to its own file Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/cc.gyp ('k') | cc/layers/render_surface_draw_properties.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/render_surface_draw_properties.h
diff --git a/cc/layers/render_surface_draw_properties.h b/cc/layers/render_surface_draw_properties.h
new file mode 100644
index 0000000000000000000000000000000000000000..f648909a81d9bc763e85bcdfcf21b9b9a3ee2a2e
--- /dev/null
+++ b/cc/layers/render_surface_draw_properties.h
@@ -0,0 +1,45 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CC_LAYERS_RENDER_SURFACE_DRAW_PROPERTIES_H_
+#define CC_LAYERS_RENDER_SURFACE_DRAW_PROPERTIES_H_
+
+#include "cc/base/cc_export.h"
+#include "ui/gfx/geometry/rect.h"
+#include "ui/gfx/transform.h"
+
+namespace cc {
+
+// Container for properties that render surfaces need to compute before they can
+// be drawn.
+struct CC_EXPORT RenderSurfaceDrawProperties {
+ RenderSurfaceDrawProperties();
+ ~RenderSurfaceDrawProperties();
+
+ float draw_opacity;
+
+ // Transforms from the surface's own space to the space of its target surface.
+ gfx::Transform draw_transform;
+
+ // Transforms from the surface's own space to the viewport.
+ gfx::Transform screen_space_transform;
+
+ // If the surface has a replica, these transform from the replica's space to
+ // the space of the target surface and the viewport.
+ gfx::Transform replica_draw_transform;
+ gfx::Transform replica_screen_space_transform;
+
+ // This is in the surface's own space.
+ gfx::Rect content_rect;
+
+ // This is in the space of the surface's target surface.
+ gfx::Rect clip_rect;
+
+ // True if the surface needs to be clipped by clip_rect.
+ bool is_clipped;
+};
+
+} // namespace cc
+
+#endif // CC_LAYERS_RENDER_SURFACE_DRAW_PROPERTIES_H_
« no previous file with comments | « cc/cc.gyp ('k') | cc/layers/render_surface_draw_properties.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698