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/shared_quad_state.h" | 5 #include "cc/shared_quad_state.h" |
6 | 6 |
7 namespace cc { | 7 namespace cc { |
8 | 8 |
9 SharedQuadState::SharedQuadState() : opacity(0) {} | 9 SharedQuadState::SharedQuadState() : opacity(0) {} |
10 | 10 |
11 scoped_ptr<SharedQuadState> SharedQuadState::Create() { | 11 scoped_ptr<SharedQuadState> SharedQuadState::Create() { |
12 return make_scoped_ptr(new SharedQuadState); | 12 return make_scoped_ptr(new SharedQuadState); |
13 } | 13 } |
14 | 14 |
15 scoped_ptr<SharedQuadState> SharedQuadState::Copy() const { | 15 scoped_ptr<SharedQuadState> SharedQuadState::Copy() const { |
16 return make_scoped_ptr(new SharedQuadState(*this)); | 16 return make_scoped_ptr(new SharedQuadState(*this)); |
17 } | 17 } |
18 | 18 |
19 void SharedQuadState::SetAll( | 19 void SharedQuadState::SetAll( |
20 const WebKit::WebTransformationMatrix& content_to_target_transform, | 20 const gfx::Transform& content_to_target_transform, |
21 const gfx::Rect& visible_content_rect, | 21 const gfx::Rect& visible_content_rect, |
22 const gfx::Rect& clipped_rect_in_target, | 22 const gfx::Rect& clipped_rect_in_target, |
23 float opacity) { | 23 float opacity) { |
24 this->content_to_target_transform = content_to_target_transform; | 24 this->content_to_target_transform = content_to_target_transform; |
25 this->visible_content_rect = visible_content_rect; | 25 this->visible_content_rect = visible_content_rect; |
26 this->clipped_rect_in_target = clipped_rect_in_target; | 26 this->clipped_rect_in_target = clipped_rect_in_target; |
27 this->opacity = opacity; | 27 this->opacity = opacity; |
28 } | 28 } |
29 | 29 |
30 } // namespace cc | 30 } // namespace cc |
OLD | NEW |