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" | 5 #include "config.h" |
6 | 6 |
7 #include "CCCheckerboardDrawQuad.h" | 7 #include "cc/checkerboard_draw_quad.h" |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 | 10 |
11 namespace cc { | 11 namespace cc { |
12 | 12 |
13 scoped_ptr<CheckerboardDrawQuad> CheckerboardDrawQuad::create(const SharedQuadSt
ate* sharedQuadState, const gfx::Rect& quadRect, SkColor color) | 13 scoped_ptr<CheckerboardDrawQuad> CheckerboardDrawQuad::create(const SharedQuadSt
ate* sharedQuadState, const gfx::Rect& quadRect, SkColor color) |
14 { | 14 { |
15 return make_scoped_ptr(new CheckerboardDrawQuad(sharedQuadState, quadRect, c
olor)); | 15 return make_scoped_ptr(new CheckerboardDrawQuad(sharedQuadState, quadRect, c
olor)); |
16 } | 16 } |
17 | 17 |
18 CheckerboardDrawQuad::CheckerboardDrawQuad(const SharedQuadState* sharedQuadStat
e, const gfx::Rect& quadRect, SkColor color) | 18 CheckerboardDrawQuad::CheckerboardDrawQuad(const SharedQuadState* sharedQuadStat
e, const gfx::Rect& quadRect, SkColor color) |
19 : DrawQuad(sharedQuadState, DrawQuad::Checkerboard, quadRect) | 19 : DrawQuad(sharedQuadState, DrawQuad::Checkerboard, quadRect) |
20 , m_color(color) | 20 , m_color(color) |
21 { | 21 { |
22 } | 22 } |
23 | 23 |
24 const CheckerboardDrawQuad* CheckerboardDrawQuad::materialCast(const DrawQuad* q
uad) | 24 const CheckerboardDrawQuad* CheckerboardDrawQuad::materialCast(const DrawQuad* q
uad) |
25 { | 25 { |
26 DCHECK(quad->material() == DrawQuad::Checkerboard); | 26 DCHECK(quad->material() == DrawQuad::Checkerboard); |
27 return static_cast<const CheckerboardDrawQuad*>(quad); | 27 return static_cast<const CheckerboardDrawQuad*>(quad); |
28 } | 28 } |
29 | 29 |
30 } // namespace cc | 30 } // namespace cc |
OLD | NEW |