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/color_space.h" | 14 #include "ui/gfx/color_space.h" |
15 #include "ui/gfx/geometry/rect_f.h" | 15 #include "ui/gfx/geometry/rect_f.h" |
16 #include "ui/gfx/geometry/size.h" | 16 #include "ui/gfx/geometry/size.h" |
17 | 17 |
18 namespace cc { | 18 namespace cc { |
19 | 19 |
20 class CC_EXPORT YUVVideoDrawQuad : public DrawQuad { | 20 class CC_EXPORT YUVVideoDrawQuad : public DrawQuad { |
21 public: | 21 public: |
22 static const size_t kYPlaneResourceIdIndex = 0; | 22 static const size_t kYPlaneResourceIdIndex = 0; |
23 static const size_t kUPlaneResourceIdIndex = 1; | 23 static const size_t kUPlaneResourceIdIndex = 1; |
24 static const size_t kVPlaneResourceIdIndex = 2; | 24 static const size_t kVPlaneResourceIdIndex = 2; |
25 static const size_t kAPlaneResourceIdIndex = 3; | 25 static const size_t kAPlaneResourceIdIndex = 3; |
26 | 26 |
27 enum : uint32_t { kMinBitsPerChannel = 8, kMaxBitsPerChannel = 24 }; | 27 enum : uint32_t { kMinBitsPerChannel = 8, kMaxBitsPerChannel = 16 }; |
28 | 28 |
29 enum ColorSpace { | 29 enum ColorSpace { |
30 REC_601, // SDTV standard with restricted "studio swing" color range. | 30 REC_601, // SDTV standard with restricted "studio swing" color range. |
31 REC_709, // HDTV standard with restricted "studio swing" color range. | 31 REC_709, // HDTV standard with restricted "studio swing" color range. |
32 JPEG, // Full color range [0, 255] JPEG color space. | 32 JPEG, // Full color range [0, 255] JPEG color space. |
33 COLOR_SPACE_LAST = JPEG | 33 COLOR_SPACE_LAST = JPEG |
34 }; | 34 }; |
35 | 35 |
36 ~YUVVideoDrawQuad() override; | 36 ~YUVVideoDrawQuad() override; |
37 | 37 |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 return resources.ids[kAPlaneResourceIdIndex]; | 107 return resources.ids[kAPlaneResourceIdIndex]; |
108 } | 108 } |
109 | 109 |
110 private: | 110 private: |
111 void ExtendValue(base::trace_event::TracedValue* value) const override; | 111 void ExtendValue(base::trace_event::TracedValue* value) const override; |
112 }; | 112 }; |
113 | 113 |
114 } // namespace cc | 114 } // namespace cc |
115 | 115 |
116 #endif // CC_QUADS_YUV_VIDEO_DRAW_QUAD_H_ | 116 #endif // CC_QUADS_YUV_VIDEO_DRAW_QUAD_H_ |
OLD | NEW |