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.
5 #include "cc/shared_quad_state.h"
9 SharedQuadState::SharedQuadState() : opacity(0) {}
11 SharedQuadState::~SharedQuadState() {}
13 scoped_ptr
<SharedQuadState
> SharedQuadState::Create() {
14 return make_scoped_ptr(new SharedQuadState
);
17 scoped_ptr
<SharedQuadState
> SharedQuadState::Copy() const {
18 return make_scoped_ptr(new SharedQuadState(*this));
21 void SharedQuadState::SetAll(
22 const gfx::Transform
& content_to_target_transform
,
23 const gfx::Rect
& visible_content_rect
,
24 const gfx::Rect
& clipped_rect_in_target
,
25 const gfx::Rect
& clip_rect
,
28 this->content_to_target_transform
= content_to_target_transform
;
29 this->visible_content_rect
= visible_content_rect
;
30 this->clipped_rect_in_target
= clipped_rect_in_target
;
31 this->clip_rect
= clip_rect
;
32 this->is_clipped
= is_clipped
;
33 this->opacity
= opacity
;