| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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_QUADS_YUV_VIDEO_DRAW_QUAD_H_ | 5 #ifndef CC_QUADS_YUV_VIDEO_DRAW_QUAD_H_ |
| 6 #define CC_QUADS_YUV_VIDEO_DRAW_QUAD_H_ | 6 #define CC_QUADS_YUV_VIDEO_DRAW_QUAD_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 | 11 |
| 12 #include "cc/base/cc_export.h" | 12 #include "cc/base/cc_export.h" |
| 13 #include "cc/quads/draw_quad.h" | 13 #include "cc/quads/draw_quad.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 | 16 |
| 17 namespace cc { | 17 namespace cc { |
| 18 | 18 |
| 19 class CC_EXPORT YUVVideoDrawQuad : public DrawQuad { | 19 class CC_EXPORT YUVVideoDrawQuad : public DrawQuad { |
| 20 public: | 20 public: |
| 21 static const size_t kYPlaneResourceIdIndex = 0; |
| 22 static const size_t kUPlaneResourceIdIndex = 1; |
| 23 static const size_t kVPlaneResourceIdIndex = 2; |
| 24 static const size_t kAPlaneResourceIdIndex = 3; |
| 25 |
| 21 enum ColorSpace { | 26 enum ColorSpace { |
| 22 REC_601, // SDTV standard with restricted "studio swing" color range. | 27 REC_601, // SDTV standard with restricted "studio swing" color range. |
| 23 REC_709, // HDTV standard with restricted "studio swing" color range. | 28 REC_709, // HDTV standard with restricted "studio swing" color range. |
| 24 JPEG, // Full color range [0, 255] JPEG color space. | 29 JPEG, // Full color range [0, 255] JPEG color space. |
| 25 COLOR_SPACE_LAST = JPEG | 30 COLOR_SPACE_LAST = JPEG |
| 26 }; | 31 }; |
| 27 | 32 |
| 28 ~YUVVideoDrawQuad() override; | 33 ~YUVVideoDrawQuad() override; |
| 29 | 34 |
| 30 YUVVideoDrawQuad(); | 35 YUVVideoDrawQuad(); |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 return resources.ids[kUPlaneResourceIdIndex]; | 91 return resources.ids[kUPlaneResourceIdIndex]; |
| 87 } | 92 } |
| 88 ResourceId v_plane_resource_id() const { | 93 ResourceId v_plane_resource_id() const { |
| 89 return resources.ids[kVPlaneResourceIdIndex]; | 94 return resources.ids[kVPlaneResourceIdIndex]; |
| 90 } | 95 } |
| 91 ResourceId a_plane_resource_id() const { | 96 ResourceId a_plane_resource_id() const { |
| 92 return resources.ids[kAPlaneResourceIdIndex]; | 97 return resources.ids[kAPlaneResourceIdIndex]; |
| 93 } | 98 } |
| 94 | 99 |
| 95 private: | 100 private: |
| 96 static const size_t kYPlaneResourceIdIndex = 0; | |
| 97 static const size_t kUPlaneResourceIdIndex = 1; | |
| 98 static const size_t kVPlaneResourceIdIndex = 2; | |
| 99 static const size_t kAPlaneResourceIdIndex = 3; | |
| 100 | |
| 101 void ExtendValue(base::trace_event::TracedValue* value) const override; | 101 void ExtendValue(base::trace_event::TracedValue* value) const override; |
| 102 }; | 102 }; |
| 103 | 103 |
| 104 } // namespace cc | 104 } // namespace cc |
| 105 | 105 |
| 106 #endif // CC_QUADS_YUV_VIDEO_DRAW_QUAD_H_ | 106 #endif // CC_QUADS_YUV_VIDEO_DRAW_QUAD_H_ |
| OLD | NEW |