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 "config.h" | |
6 | |
7 #include "cc/draw_quad.h" | 5 #include "cc/draw_quad.h" |
8 | 6 |
9 #include "base/logging.h" | 7 #include "base/logging.h" |
10 #include "cc/checkerboard_draw_quad.h" | 8 #include "cc/checkerboard_draw_quad.h" |
11 #include "cc/debug_border_draw_quad.h" | 9 #include "cc/debug_border_draw_quad.h" |
12 #include "cc/io_surface_draw_quad.h" | 10 #include "cc/io_surface_draw_quad.h" |
13 #include "cc/render_pass_draw_quad.h" | 11 #include "cc/render_pass_draw_quad.h" |
14 #include "cc/solid_color_draw_quad.h" | 12 #include "cc/solid_color_draw_quad.h" |
15 #include "cc/stream_video_draw_quad.h" | 13 #include "cc/stream_video_draw_quad.h" |
16 #include "cc/texture_draw_quad.h" | 14 #include "cc/texture_draw_quad.h" |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 copyQuad.reset(TypedCopy<TileDrawQuad>(this)); | 75 copyQuad.reset(TypedCopy<TileDrawQuad>(this)); |
78 break; | 76 break; |
79 case StreamVideoContent: | 77 case StreamVideoContent: |
80 copyQuad.reset(TypedCopy<StreamVideoDrawQuad>(this)); | 78 copyQuad.reset(TypedCopy<StreamVideoDrawQuad>(this)); |
81 break; | 79 break; |
82 case YUVVideoContent: | 80 case YUVVideoContent: |
83 copyQuad.reset(TypedCopy<YUVVideoDrawQuad>(this)); | 81 copyQuad.reset(TypedCopy<YUVVideoDrawQuad>(this)); |
84 break; | 82 break; |
85 case RenderPass: // RenderPass quads have their own copy() method. | 83 case RenderPass: // RenderPass quads have their own copy() method. |
86 case Invalid: | 84 case Invalid: |
87 CRASH(); | 85 LOG(FATAL) << "Invalid DrawQuad material " << material(); |
88 break; | 86 break; |
89 } | 87 } |
90 copyQuad->setSharedQuadState(copiedSharedQuadState); | 88 copyQuad->setSharedQuadState(copiedSharedQuadState); |
91 return copyQuad.Pass(); | 89 return copyQuad.Pass(); |
92 } | 90 } |
93 | 91 |
94 void DrawQuad::setSharedQuadState(const SharedQuadState* sharedQuadState) | 92 void DrawQuad::setSharedQuadState(const SharedQuadState* sharedQuadState) |
95 { | 93 { |
96 m_sharedQuadState = sharedQuadState; | 94 m_sharedQuadState = sharedQuadState; |
97 m_sharedQuadStateId = sharedQuadState->id; | 95 m_sharedQuadStateId = sharedQuadState->id; |
98 } | 96 } |
99 | 97 |
100 } // namespace cc | 98 } // namespace cc |
OLD | NEW |