James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 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. |
| 4 | |
| 5 | #ifndef CC_QUADS_CONTENT_DRAW_QUAD_BASE_H_ |
| 6 | #define CC_QUADS_CONTENT_DRAW_QUAD_BASE_H_ |
| 7 | |
| 8 | #include "base/memory/scoped_ptr.h" |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 9 | #include "cc/quads/draw_quad.h" |
James Robinson | 30d547e | 2014-10-23 18:20:06 -0700 | [diff] [blame] | 10 | #include "ui/gfx/geometry/point.h" |
| 11 | #include "ui/gfx/geometry/size.h" |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 12 | |
| 13 | namespace cc { |
| 14 | |
James Robinson | 41b80ab | 2015-04-03 16:10:47 -0700 | [diff] [blame] | 15 | class ContentDrawQuadBase : public DrawQuad { |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 16 | public: |
| 17 | void SetNew(const SharedQuadState* shared_quad_state, |
| 18 | DrawQuad::Material material, |
| 19 | const gfx::Rect& rect, |
| 20 | const gfx::Rect& opaque_rect, |
| 21 | const gfx::Rect& visible_rect, |
| 22 | const gfx::RectF& tex_coord_rect, |
| 23 | const gfx::Size& texture_size, |
Etienne Membrives | b1556b3 | 2014-12-16 13:56:09 +0100 | [diff] [blame] | 24 | bool swizzle_contents, |
| 25 | bool nearest_neighbor); |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 26 | |
| 27 | void SetAll(const SharedQuadState* shared_quad_state, |
| 28 | DrawQuad::Material material, |
| 29 | const gfx::Rect& rect, |
| 30 | const gfx::Rect& opaque_rect, |
| 31 | const gfx::Rect& visible_rect, |
| 32 | bool needs_blending, |
| 33 | const gfx::RectF& tex_coord_rect, |
| 34 | const gfx::Size& texture_size, |
Etienne Membrives | b1556b3 | 2014-12-16 13:56:09 +0100 | [diff] [blame] | 35 | bool swizzle_contents, |
| 36 | bool nearest_neighbor); |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 37 | |
| 38 | gfx::RectF tex_coord_rect; |
| 39 | gfx::Size texture_size; |
| 40 | bool swizzle_contents; |
Etienne Membrives | b1556b3 | 2014-12-16 13:56:09 +0100 | [diff] [blame] | 41 | bool nearest_neighbor; |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 42 | |
| 43 | protected: |
| 44 | ContentDrawQuadBase(); |
James Robinson | e1b30cf | 2014-10-21 12:25:40 -0700 | [diff] [blame] | 45 | ~ContentDrawQuadBase() override; |
Etienne Membrives | 386015a | 2015-02-19 17:27:12 +0100 | [diff] [blame] | 46 | void ExtendValue(base::trace_event::TracedValue* value) const override; |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 47 | }; |
| 48 | |
| 49 | } // namespace cc |
| 50 | |
| 51 | #endif // CC_QUADS_CONTENT_DRAW_QUAD_BASE_H_ |