1 // Copyright 2013 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_CONTENT_DRAW_QUAD_BASE_H_
6 #define CC_QUADS_CONTENT_DRAW_QUAD_BASE_H_
8 #include "base/memory/scoped_ptr.h"
9 #include "cc/base/cc_export.h"
10 #include "cc/quads/draw_quad.h"
11 #include "ui/gfx/geometry/rect_f.h"
12 #include "ui/gfx/geometry/size.h"
20 class CC_EXPORT ContentDrawQuadBase
: public DrawQuad
{
22 void SetNew(const SharedQuadState
* shared_quad_state
,
23 DrawQuad::Material material
,
24 const gfx::Rect
& rect
,
25 const gfx::Rect
& opaque_rect
,
26 const gfx::Rect
& visible_rect
,
27 const gfx::RectF
& tex_coord_rect
,
28 const gfx::Size
& texture_size
,
29 bool swizzle_contents
,
30 bool nearest_neighbor
);
32 void SetAll(const SharedQuadState
* shared_quad_state
,
33 DrawQuad::Material material
,
34 const gfx::Rect
& rect
,
35 const gfx::Rect
& opaque_rect
,
36 const gfx::Rect
& visible_rect
,
38 const gfx::RectF
& tex_coord_rect
,
39 const gfx::Size
& texture_size
,
40 bool swizzle_contents
,
41 bool nearest_neighbor
);
43 gfx::RectF tex_coord_rect
;
44 gfx::Size texture_size
;
45 bool swizzle_contents
;
46 bool nearest_neighbor
;
49 ContentDrawQuadBase();
50 ~ContentDrawQuadBase() override
;
51 void ExtendValue(base::trace_event::TracedValue
* value
) const override
;
56 #endif // CC_QUADS_CONTENT_DRAW_QUAD_BASE_H_