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/quads/shared_quad_state.h"
9 SharedQuadState::SharedQuadState() : is_clipped(false), opacity(0.f
) {}
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 gfx::Size content_bounds
,
24 gfx::Rect visible_content_rect
,
28 this->content_to_target_transform
= content_to_target_transform
;
29 this->content_bounds
= content_bounds
;
30 this->visible_content_rect
= visible_content_rect
;
31 this->clip_rect
= clip_rect
;
32 this->is_clipped
= is_clipped
;
33 this->opacity
= opacity
;