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" |
11 #include "cc/render_pass_draw_quad.h" | 11 #include "cc/render_pass_draw_quad.h" |
12 #include "cc/solid_color_draw_quad.h" | 12 #include "cc/solid_color_draw_quad.h" |
13 #include "cc/stream_video_draw_quad.h" | 13 #include "cc/stream_video_draw_quad.h" |
14 #include "cc/texture_draw_quad.h" | 14 #include "cc/texture_draw_quad.h" |
15 #include "cc/tile_draw_quad.h" | 15 #include "cc/tile_draw_quad.h" |
16 #include "cc/yuv_video_draw_quad.h" | 16 #include "cc/yuv_video_draw_quad.h" |
17 | 17 |
18 namespace { | 18 namespace { |
19 | 19 |
20 template<typename T> T* TypedCopy(const cc::DrawQuad* other) { | 20 template<typename T> T* TypedCopy(const cc::DrawQuad* other) { |
21 return new T(*T::materialCast(other)); | 21 return new T(*T::MaterialCast(other)); |
22 } | 22 } |
23 | 23 |
24 } | 24 } |
25 | 25 |
26 namespace cc { | 26 namespace cc { |
27 | 27 |
28 DrawQuad::DrawQuad() | 28 DrawQuad::DrawQuad() |
29 : shared_quad_state(), | 29 : shared_quad_state(), |
30 material(INVALID), | 30 material(INVALID), |
31 needs_blending(false) { | 31 needs_blending(false) { |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 case RENDER_PASS: // RenderPass quads have their own copy() method. | 83 case RENDER_PASS: // RenderPass quads have their own copy() method. |
84 case INVALID: | 84 case INVALID: |
85 LOG(FATAL) << "Invalid DrawQuad material " << material; | 85 LOG(FATAL) << "Invalid DrawQuad material " << material; |
86 break; | 86 break; |
87 } | 87 } |
88 copy_quad->shared_quad_state = copied_shared_quad_state; | 88 copy_quad->shared_quad_state = copied_shared_quad_state; |
89 return copy_quad.Pass(); | 89 return copy_quad.Pass(); |
90 } | 90 } |
91 | 91 |
92 } // namespace cc | 92 } // namespace cc |
OLD | NEW |