OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_SURFACE_DRAW_QUAD_H_ | 5 #ifndef CC_QUADS_SURFACE_DRAW_QUAD_H_ |
6 #define CC_QUADS_SURFACE_DRAW_QUAD_H_ | 6 #define CC_QUADS_SURFACE_DRAW_QUAD_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "cc/base/cc_export.h" | 10 #include "cc/base/cc_export.h" |
11 #include "cc/quads/draw_quad.h" | 11 #include "cc/quads/draw_quad.h" |
12 #include "cc/surfaces/surface_id.h" | 12 #include "cc/surfaces/surface_id.h" |
13 | 13 |
14 namespace cc { | 14 namespace cc { |
15 | 15 |
16 class CC_EXPORT SurfaceDrawQuad : public DrawQuad { | 16 class CC_EXPORT SurfaceDrawQuad : public DrawQuad { |
17 public: | 17 public: |
18 SurfaceDrawQuad(); | 18 SurfaceDrawQuad(); |
19 | 19 |
20 void SetNew(const SharedQuadState* shared_quad_state, | 20 void SetNew(const SharedQuadState* shared_quad_state, |
21 const gfx::Rect& rect, | 21 const gfx::Rect& rect, |
22 const gfx::Rect& visible_rect, | 22 const gfx::Rect& visible_rect, |
23 SurfaceId surface_id); | 23 const SurfaceId& surface_id); |
24 | 24 |
25 void SetAll(const SharedQuadState* shared_quad_state, | 25 void SetAll(const SharedQuadState* shared_quad_state, |
26 const gfx::Rect& rect, | 26 const gfx::Rect& rect, |
27 const gfx::Rect& opaque_rect, | 27 const gfx::Rect& opaque_rect, |
28 const gfx::Rect& visible_rect, | 28 const gfx::Rect& visible_rect, |
29 bool needs_blending, | 29 bool needs_blending, |
30 SurfaceId surface_id); | 30 const SurfaceId& surface_id); |
31 | 31 |
32 SurfaceId surface_id; | 32 SurfaceId surface_id; |
33 | 33 |
34 static const SurfaceDrawQuad* MaterialCast(const DrawQuad* quad); | 34 static const SurfaceDrawQuad* MaterialCast(const DrawQuad* quad); |
35 | 35 |
36 private: | 36 private: |
37 void ExtendValue(base::trace_event::TracedValue* value) const override; | 37 void ExtendValue(base::trace_event::TracedValue* value) const override; |
38 }; | 38 }; |
39 | 39 |
40 } // namespace cc | 40 } // namespace cc |
41 | 41 |
42 #endif // CC_QUADS_SURFACE_DRAW_QUAD_H_ | 42 #endif // CC_QUADS_SURFACE_DRAW_QUAD_H_ |
OLD | NEW |