Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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. | |
| 4 | |
| 5 #ifndef CC_OUTPUT_CA_LAYER_OVERLAY_H_ | |
| 6 #define CC_OUTPUT_CA_LAYER_OVERLAY_H_ | |
| 7 | |
| 8 #include "cc/quads/render_pass.h" | |
| 9 #include "third_party/skia/include/core/SkColor.h" | |
| 10 #include "third_party/skia/include/utils/SkMatrix44.h" | |
| 11 #include "ui/gfx/geometry/rect_f.h" | |
| 12 | |
| 13 namespace cc { | |
| 14 | |
| 15 class DrawQuad; | |
| 16 class ResourceProvider; | |
| 17 | |
| 18 class CC_EXPORT CALayerOverlay { | |
| 19 public: | |
| 20 CALayerOverlay(); | |
| 21 ~CALayerOverlay(); | |
| 22 | |
| 23 // Texture that corresponds to an IOSurface to set as the content of the | |
| 24 // CALayer. If this is 0 then the CALayer is a solid color. | |
| 25 unsigned contents_resource_id; | |
|
alexst (slow to review)
2015/11/12 14:36:18
I wonder if we could fork things a bit further dow
ccameron
2015/11/12 17:31:47
I was going in this direction at first, but back i
| |
| 26 // The contents rect property for the CALayer. | |
| 27 gfx::RectF contents_rect; | |
| 28 // The opacity property for the CAayer. | |
| 29 float opacity; | |
| 30 // The background color property for the CALayer. | |
| 31 SkColor background_color; | |
| 32 // The bounds for the CALayer in pixels. | |
| 33 gfx::SizeF bounds_size; | |
| 34 // The transform to apply to the CALayer. | |
| 35 SkMatrix44 transform; | |
| 36 }; | |
| 37 | |
| 38 typedef std::vector<CALayerOverlay> CALayerOverlayList; | |
| 39 | |
| 40 // Returns true if all quads in the root render pass have been replaced by | |
| 41 // CALayerOverlays. | |
| 42 bool ProcessForCALayerOverlays(ResourceProvider* resource_provider, | |
| 43 const gfx::RectF& display_rect, | |
| 44 const QuadList& quad_list, | |
| 45 CALayerOverlayList* ca_layer_overlays); | |
| 46 | |
| 47 } // namespace cc | |
| 48 | |
| 49 #endif // CC_OUTPUT_CA_LAYER_OVERLAY_H_ | |
| OLD | NEW |