[email protected] | 94f206c1 | 2012-08-25 00:09:14 | [diff] [blame] | 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 | ||||
3 | // found in the LICENSE file. | ||||
4 | |||||
[email protected] | 4456eee2 | 2012-10-19 18:16:38 | [diff] [blame] | 5 | #include "cc/shared_quad_state.h" |
[email protected] | 94f206c1 | 2012-08-25 00:09:14 | [diff] [blame] | 6 | |
[email protected] | 9c88e56 | 2012-09-14 22:21:30 | [diff] [blame] | 7 | namespace cc { |
[email protected] | 94f206c1 | 2012-08-25 00:09:14 | [diff] [blame] | 8 | |
[email protected] | 7aba666 | 2013-03-12 10:17:34 | [diff] [blame] | 9 | SharedQuadState::SharedQuadState() : is_clipped(false), opacity(0.f) {} |
[email protected] | cb7af74 | 2012-11-21 04:02:24 | [diff] [blame] | 10 | |
[email protected] | dc462d78 | 2012-11-21 21:43:01 | [diff] [blame] | 11 | SharedQuadState::~SharedQuadState() {} |
12 | |||||
[email protected] | cb7af74 | 2012-11-21 04:02:24 | [diff] [blame] | 13 | scoped_ptr<SharedQuadState> SharedQuadState::Create() { |
14 | return make_scoped_ptr(new SharedQuadState); | ||||
[email protected] | 94f206c1 | 2012-08-25 00:09:14 | [diff] [blame] | 15 | } |
16 | |||||
[email protected] | cb7af74 | 2012-11-21 04:02:24 | [diff] [blame] | 17 | scoped_ptr<SharedQuadState> SharedQuadState::Copy() const { |
18 | return make_scoped_ptr(new SharedQuadState(*this)); | ||||
[email protected] | 94f206c1 | 2012-08-25 00:09:14 | [diff] [blame] | 19 | } |
20 | |||||
[email protected] | cb7af74 | 2012-11-21 04:02:24 | [diff] [blame] | 21 | void SharedQuadState::SetAll( |
[email protected] | c8686a0 | 2012-11-27 08:29:00 | [diff] [blame] | 22 | const gfx::Transform& content_to_target_transform, |
[email protected] | f902bf9 | 2013-03-04 18:33:27 | [diff] [blame] | 23 | const gfx::Size content_bounds, |
[email protected] | cb7af74 | 2012-11-21 04:02:24 | [diff] [blame] | 24 | const gfx::Rect& visible_content_rect, |
[email protected] | dc462d78 | 2012-11-21 21:43:01 | [diff] [blame] | 25 | const gfx::Rect& clip_rect, |
26 | bool is_clipped, | ||||
[email protected] | cb7af74 | 2012-11-21 04:02:24 | [diff] [blame] | 27 | float opacity) { |
28 | this->content_to_target_transform = content_to_target_transform; | ||||
[email protected] | f902bf9 | 2013-03-04 18:33:27 | [diff] [blame] | 29 | this->content_bounds = content_bounds; |
[email protected] | cb7af74 | 2012-11-21 04:02:24 | [diff] [blame] | 30 | this->visible_content_rect = visible_content_rect; |
[email protected] | dc462d78 | 2012-11-21 21:43:01 | [diff] [blame] | 31 | this->clip_rect = clip_rect; |
32 | this->is_clipped = is_clipped; | ||||
[email protected] | cb7af74 | 2012-11-21 04:02:24 | [diff] [blame] | 33 | this->opacity = opacity; |
[email protected] | 0f077a5 | 2012-09-08 01:45:24 | [diff] [blame] | 34 | } |
35 | |||||
[email protected] | db12400 | 2012-10-09 02:34:42 | [diff] [blame] | 36 | } // namespace cc |