| 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 13 matching lines...) Expand all Loading... |
| 24 class DrawQuad; | 24 class DrawQuad; |
| 25 class IOSurfaceDrawQuad; | 25 class IOSurfaceDrawQuad; |
| 26 class StreamVideoDrawQuad; | 26 class StreamVideoDrawQuad; |
| 27 class TextureDrawQuad; | 27 class TextureDrawQuad; |
| 28 | 28 |
| 29 class CC_EXPORT OverlayCandidate { | 29 class CC_EXPORT OverlayCandidate { |
| 30 public: | 30 public: |
| 31 // Returns true and fills in |candidate| if |draw_quad| is of a known quad | 31 // Returns true and fills in |candidate| if |draw_quad| is of a known quad |
| 32 // type and contains an overlayable resource. | 32 // type and contains an overlayable resource. |
| 33 static bool FromDrawQuad(const DrawQuad* quad, OverlayCandidate* candidate); | 33 static bool FromDrawQuad(const DrawQuad* quad, OverlayCandidate* candidate); |
| 34 // Returns true if |quad| will not block quads underneath from becoming |
| 35 // an overlay. |
| 36 static bool IsInvisibleQuad(const DrawQuad* quad); |
| 37 |
| 34 OverlayCandidate(); | 38 OverlayCandidate(); |
| 35 ~OverlayCandidate(); | 39 ~OverlayCandidate(); |
| 36 | 40 |
| 37 // Transformation to apply to layer during composition. | 41 // Transformation to apply to layer during composition. |
| 38 gfx::OverlayTransform transform; | 42 gfx::OverlayTransform transform; |
| 39 // Format of the buffer to composite. | 43 // Format of the buffer to composite. |
| 40 ResourceFormat format; | 44 ResourceFormat format; |
| 41 // Size of the resource, in pixels. | 45 // Size of the resource, in pixels. |
| 42 gfx::Size resource_size_in_pixels; | 46 gfx::Size resource_size_in_pixels; |
| 43 // Rect on the display to position the overlay to. Implementer must convert | 47 // Rect on the display to position the overlay to. Implementer must convert |
| (...skipping 27 matching lines...) Expand all Loading... |
| 71 OverlayCandidate* candidate); | 75 OverlayCandidate* candidate); |
| 72 static bool FromIOSurfaceQuad(const IOSurfaceDrawQuad* quad, | 76 static bool FromIOSurfaceQuad(const IOSurfaceDrawQuad* quad, |
| 73 OverlayCandidate* candidate); | 77 OverlayCandidate* candidate); |
| 74 }; | 78 }; |
| 75 | 79 |
| 76 typedef std::vector<OverlayCandidate> OverlayCandidateList; | 80 typedef std::vector<OverlayCandidate> OverlayCandidateList; |
| 77 | 81 |
| 78 } // namespace cc | 82 } // namespace cc |
| 79 | 83 |
| 80 #endif // CC_OUTPUT_OVERLAY_CANDIDATE_H_ | 84 #endif // CC_OUTPUT_OVERLAY_CANDIDATE_H_ |
| OLD | NEW |