| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CC_OUTPUT_OVERLAY_CANDIDATE_H_ | 5 #ifndef CC_OUTPUT_OVERLAY_CANDIDATE_H_ |
| 6 #define CC_OUTPUT_OVERLAY_CANDIDATE_H_ | 6 #define CC_OUTPUT_OVERLAY_CANDIDATE_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "cc/base/cc_export.h" | 10 #include "cc/base/cc_export.h" |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 gfx::Rect quad_rect_in_target_space; | 63 gfx::Rect quad_rect_in_target_space; |
| 64 // Clip rect in the target content space after composition. | 64 // Clip rect in the target content space after composition. |
| 65 gfx::Rect clip_rect; | 65 gfx::Rect clip_rect; |
| 66 // If the quad is clipped after composition. | 66 // If the quad is clipped after composition. |
| 67 bool is_clipped; | 67 bool is_clipped; |
| 68 // True if the texture for this overlay should be the same one used by the | 68 // True if the texture for this overlay should be the same one used by the |
| 69 // output surface's main overlay. | 69 // output surface's main overlay. |
| 70 bool use_output_surface_for_resource; | 70 bool use_output_surface_for_resource; |
| 71 // Texture resource to present in an overlay. | 71 // Texture resource to present in an overlay. |
| 72 unsigned resource_id; | 72 unsigned resource_id; |
| 73 |
| 74 #if defined(OS_ANDROID) |
| 75 // For candidates from StreamVideoDrawQuads, this records whether the quad is |
| 76 // marked as being backed by a SurfaceTexture or not. If so, it's not really |
| 77 // promotable to an overlay. |
| 78 bool is_backed_by_surface_texture; |
| 79 #endif |
| 80 |
| 73 // Stacking order of the overlay plane relative to the main surface, | 81 // Stacking order of the overlay plane relative to the main surface, |
| 74 // which is 0. Signed to allow for "underlays". | 82 // which is 0. Signed to allow for "underlays". |
| 75 int plane_z_order; | 83 int plane_z_order; |
| 76 // True if the overlay does not have any visible quads on top of it. Set by | 84 // True if the overlay does not have any visible quads on top of it. Set by |
| 77 // the strategy so the OverlayProcessor can consider subtracting damage caused | 85 // the strategy so the OverlayProcessor can consider subtracting damage caused |
| 78 // by underlay quads. | 86 // by underlay quads. |
| 79 bool is_unoccluded; | 87 bool is_unoccluded; |
| 80 | 88 |
| 81 // To be modified by the implementer if this candidate can go into | 89 // To be modified by the implementer if this candidate can go into |
| 82 // an overlay. | 90 // an overlay. |
| 83 bool overlay_handled; | 91 bool overlay_handled; |
| 84 | 92 |
| 85 private: | 93 private: |
| 86 static bool FromTextureQuad(ResourceProvider* resource_provider, | 94 static bool FromTextureQuad(ResourceProvider* resource_provider, |
| 87 const TextureDrawQuad* quad, | 95 const TextureDrawQuad* quad, |
| 88 OverlayCandidate* candidate); | 96 OverlayCandidate* candidate); |
| 89 static bool FromStreamVideoQuad(ResourceProvider* resource_provider, | 97 static bool FromStreamVideoQuad(ResourceProvider* resource_provider, |
| 90 const StreamVideoDrawQuad* quad, | 98 const StreamVideoDrawQuad* quad, |
| 91 OverlayCandidate* candidate); | 99 OverlayCandidate* candidate); |
| 92 }; | 100 }; |
| 93 | 101 |
| 94 typedef std::vector<OverlayCandidate> OverlayCandidateList; | 102 typedef std::vector<OverlayCandidate> OverlayCandidateList; |
| 95 | 103 |
| 96 } // namespace cc | 104 } // namespace cc |
| 97 | 105 |
| 98 #endif // CC_OUTPUT_OVERLAY_CANDIDATE_H_ | 106 #endif // CC_OUTPUT_OVERLAY_CANDIDATE_H_ |
| OLD | NEW |