Don't show supervised user as "already on this device" while they're being imported.
[chromium-blink-merge.git] / cc / quads / yuv_video_draw_quad.h
blobdeeca2c1cbce07d9b764d52f48c1001e01b7b778
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
3 // found in the LICENSE file.
5 #ifndef CC_QUADS_YUV_VIDEO_DRAW_QUAD_H_
6 #define CC_QUADS_YUV_VIDEO_DRAW_QUAD_H_
8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "cc/base/cc_export.h"
11 #include "cc/quads/draw_quad.h"
13 namespace cc {
15 class CC_EXPORT YUVVideoDrawQuad : public DrawQuad {
16 public:
17 enum ColorSpace {
18 REC_601, // SDTV standard with restricted "studio swing" color range.
19 REC_709, // HDTV standard with restricted "studio swing" color range.
20 JPEG, // Full color range [0, 255] JPEG color space.
21 COLOR_SPACE_LAST = JPEG
24 ~YUVVideoDrawQuad() override;
26 YUVVideoDrawQuad();
28 void SetNew(const SharedQuadState* shared_quad_state,
29 const gfx::Rect& rect,
30 const gfx::Rect& opaque_rect,
31 const gfx::Rect& visible_rect,
32 // |*_tex_coord_rect| contains non-normalized coordinates.
33 // TODO(reveman): Make the use of normalized vs non-normalized
34 // coordinates consistent across all quad types: crbug.com/487370
35 const gfx::RectF& ya_tex_coord_rect,
36 const gfx::RectF& uv_tex_coord_rect,
37 const gfx::Size& ya_tex_size,
38 const gfx::Size& uv_tex_size,
39 unsigned y_plane_resource_id,
40 unsigned u_plane_resource_id,
41 unsigned v_plane_resource_id,
42 unsigned a_plane_resource_id,
43 ColorSpace color_space);
45 void SetAll(const SharedQuadState* shared_quad_state,
46 const gfx::Rect& rect,
47 const gfx::Rect& opaque_rect,
48 const gfx::Rect& visible_rect,
49 bool needs_blending,
50 // |*_tex_coord_rect| contains non-normalized coordinates.
51 // TODO(reveman): Make the use of normalized vs non-normalized
52 // coordinates consistent across all quad types: crbug.com/487370
53 const gfx::RectF& ya_tex_coord_rect,
54 const gfx::RectF& uv_tex_coord_rect,
55 const gfx::Size& ya_tex_size,
56 const gfx::Size& uv_tex_size,
57 unsigned y_plane_resource_id,
58 unsigned u_plane_resource_id,
59 unsigned v_plane_resource_id,
60 unsigned a_plane_resource_id,
61 ColorSpace color_space);
63 gfx::RectF ya_tex_coord_rect;
64 gfx::RectF uv_tex_coord_rect;
65 gfx::Size ya_tex_size;
66 gfx::Size uv_tex_size;
67 unsigned y_plane_resource_id;
68 unsigned u_plane_resource_id;
69 unsigned v_plane_resource_id;
70 unsigned a_plane_resource_id;
71 ColorSpace color_space;
73 void IterateResources(const ResourceIteratorCallback& callback) override;
75 static const YUVVideoDrawQuad* MaterialCast(const DrawQuad*);
77 private:
78 void ExtendValue(base::trace_event::TracedValue* value) const override;
81 } // namespace cc
83 #endif // CC_QUADS_YUV_VIDEO_DRAW_QUAD_H_