| 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" | 
| 11 #include "cc/quads/render_pass.h" | 11 #include "cc/quads/render_pass.h" | 
| 12 #include "cc/resources/resource_format.h" | 12 #include "cc/resources/resource_format.h" | 
| 13 #include "ui/gfx/geometry/rect.h" | 13 #include "ui/gfx/geometry/rect.h" | 
| 14 #include "ui/gfx/geometry/rect_f.h" | 14 #include "ui/gfx/geometry/rect_f.h" | 
| 15 #include "ui/gfx/geometry/size.h" | 15 #include "ui/gfx/geometry/size.h" | 
| 16 #include "ui/gfx/overlay_transform.h" | 16 #include "ui/gfx/overlay_transform.h" | 
| 17 #include "ui/gfx/transform.h" | 17 #include "ui/gfx/transform.h" | 
| 18 | 18 | 
| 19 namespace gfx { | 19 namespace gfx { | 
| 20 class Rect; | 20 class Rect; | 
| 21 } | 21 } | 
| 22 | 22 | 
| 23 namespace cc { | 23 namespace cc { | 
| 24 | 24 | 
| 25 class DrawQuad; | 25 class DrawQuad; | 
| 26 class IOSurfaceDrawQuad; |  | 
| 27 class StreamVideoDrawQuad; | 26 class StreamVideoDrawQuad; | 
| 28 class TextureDrawQuad; | 27 class TextureDrawQuad; | 
| 29 class ResourceProvider; | 28 class ResourceProvider; | 
| 30 | 29 | 
| 31 class CC_EXPORT OverlayCandidate { | 30 class CC_EXPORT OverlayCandidate { | 
| 32  public: | 31  public: | 
| 33   // Returns true and fills in |candidate| if |draw_quad| is of a known quad | 32   // Returns true and fills in |candidate| if |draw_quad| is of a known quad | 
| 34   // type and contains an overlayable resource. | 33   // type and contains an overlayable resource. | 
| 35   static bool FromDrawQuad(ResourceProvider* resource_provider, | 34   static bool FromDrawQuad(ResourceProvider* resource_provider, | 
| 36                            const DrawQuad* quad, | 35                            const DrawQuad* quad, | 
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 83   // an overlay. | 82   // an overlay. | 
| 84   bool overlay_handled; | 83   bool overlay_handled; | 
| 85 | 84 | 
| 86  private: | 85  private: | 
| 87   static bool FromTextureQuad(ResourceProvider* resource_provider, | 86   static bool FromTextureQuad(ResourceProvider* resource_provider, | 
| 88                               const TextureDrawQuad* quad, | 87                               const TextureDrawQuad* quad, | 
| 89                               OverlayCandidate* candidate); | 88                               OverlayCandidate* candidate); | 
| 90   static bool FromStreamVideoQuad(ResourceProvider* resource_provider, | 89   static bool FromStreamVideoQuad(ResourceProvider* resource_provider, | 
| 91                                   const StreamVideoDrawQuad* quad, | 90                                   const StreamVideoDrawQuad* quad, | 
| 92                                   OverlayCandidate* candidate); | 91                                   OverlayCandidate* candidate); | 
| 93   static bool FromIOSurfaceQuad(ResourceProvider* resource_provider, |  | 
| 94                                 const IOSurfaceDrawQuad* quad, |  | 
| 95                                 OverlayCandidate* candidate); |  | 
| 96 }; | 92 }; | 
| 97 | 93 | 
| 98 typedef std::vector<OverlayCandidate> OverlayCandidateList; | 94 typedef std::vector<OverlayCandidate> OverlayCandidateList; | 
| 99 | 95 | 
| 100 }  // namespace cc | 96 }  // namespace cc | 
| 101 | 97 | 
| 102 #endif  // CC_OUTPUT_OVERLAY_CANDIDATE_H_ | 98 #endif  // CC_OUTPUT_OVERLAY_CANDIDATE_H_ | 
| OLD | NEW | 
|---|