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 #include "cc/draw_quad.h" | 5 #include "cc/draw_quad.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "cc/checkerboard_draw_quad.h" | 8 #include "cc/checkerboard_draw_quad.h" |
9 #include "cc/debug_border_draw_quad.h" | 9 #include "cc/debug_border_draw_quad.h" |
10 #include "cc/io_surface_draw_quad.h" | 10 #include "cc/io_surface_draw_quad.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 : shared_quad_state(), | 29 : shared_quad_state(), |
30 material(INVALID), | 30 material(INVALID), |
31 needs_blending(false) { | 31 needs_blending(false) { |
32 } | 32 } |
33 | 33 |
34 void DrawQuad::SetAll(const SharedQuadState* shared_quad_state, | 34 void DrawQuad::SetAll(const SharedQuadState* shared_quad_state, |
35 Material material, | 35 Material material, |
36 gfx::Rect rect, | 36 gfx::Rect rect, |
37 gfx::Rect opaque_rect, | 37 gfx::Rect opaque_rect, |
38 gfx::Rect visible_rect, | 38 gfx::Rect visible_rect, |
39 bool needs_blending) { | 39 bool needs_blending, |
| 40 AntiAliasing anti_aliasing) { |
40 this->material = material; | 41 this->material = material; |
41 this->rect = rect; | 42 this->rect = rect; |
42 this->opaque_rect = opaque_rect; | 43 this->opaque_rect = opaque_rect; |
43 this->visible_rect = visible_rect; | 44 this->visible_rect = visible_rect; |
44 this->needs_blending = needs_blending; | 45 this->needs_blending = needs_blending; |
| 46 this->anti_aliasing = anti_aliasing; |
45 this->shared_quad_state = shared_quad_state; | 47 this->shared_quad_state = shared_quad_state; |
46 | 48 |
47 DCHECK(shared_quad_state); | 49 DCHECK(shared_quad_state); |
48 DCHECK(material != INVALID); | 50 DCHECK(material != INVALID); |
49 } | 51 } |
50 | 52 |
51 DrawQuad::~DrawQuad() { | 53 DrawQuad::~DrawQuad() { |
52 } | 54 } |
53 | 55 |
54 scoped_ptr<DrawQuad> DrawQuad::Copy( | 56 scoped_ptr<DrawQuad> DrawQuad::Copy( |
(...skipping 28 matching lines...) Expand all Loading... |
83 case RENDER_PASS: // RenderPass quads have their own copy() method. | 85 case RENDER_PASS: // RenderPass quads have their own copy() method. |
84 case INVALID: | 86 case INVALID: |
85 LOG(FATAL) << "Invalid DrawQuad material " << material; | 87 LOG(FATAL) << "Invalid DrawQuad material " << material; |
86 break; | 88 break; |
87 } | 89 } |
88 copy_quad->shared_quad_state = copied_shared_quad_state; | 90 copy_quad->shared_quad_state = copied_shared_quad_state; |
89 return copy_quad.Pass(); | 91 return copy_quad.Pass(); |
90 } | 92 } |
91 | 93 |
92 } // namespace cc | 94 } // namespace cc |
OLD | NEW |