blob: da3036e474928457d8cc51c32929c6258c6bcc4c [file] [log] [blame]
[email protected]94f206c12012-08-25 00:09:141// 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]4456eee22012-10-19 18:16:385#include "cc/shared_quad_state.h"
[email protected]94f206c12012-08-25 00:09:146
[email protected]9c88e562012-09-14 22:21:307namespace cc {
[email protected]94f206c12012-08-25 00:09:148
[email protected]7aba6662013-03-12 10:17:349SharedQuadState::SharedQuadState() : is_clipped(false), opacity(0.f) {}
[email protected]cb7af742012-11-21 04:02:2410
[email protected]dc462d782012-11-21 21:43:0111SharedQuadState::~SharedQuadState() {}
12
[email protected]cb7af742012-11-21 04:02:2413scoped_ptr<SharedQuadState> SharedQuadState::Create() {
14 return make_scoped_ptr(new SharedQuadState);
[email protected]94f206c12012-08-25 00:09:1415}
16
[email protected]cb7af742012-11-21 04:02:2417scoped_ptr<SharedQuadState> SharedQuadState::Copy() const {
18 return make_scoped_ptr(new SharedQuadState(*this));
[email protected]94f206c12012-08-25 00:09:1419}
20
[email protected]cb7af742012-11-21 04:02:2421void SharedQuadState::SetAll(
[email protected]c8686a02012-11-27 08:29:0022 const gfx::Transform& content_to_target_transform,
[email protected]f902bf92013-03-04 18:33:2723 const gfx::Size content_bounds,
[email protected]cb7af742012-11-21 04:02:2424 const gfx::Rect& visible_content_rect,
[email protected]dc462d782012-11-21 21:43:0125 const gfx::Rect& clip_rect,
26 bool is_clipped,
[email protected]cb7af742012-11-21 04:02:2427 float opacity) {
28 this->content_to_target_transform = content_to_target_transform;
[email protected]f902bf92013-03-04 18:33:2729 this->content_bounds = content_bounds;
[email protected]cb7af742012-11-21 04:02:2430 this->visible_content_rect = visible_content_rect;
[email protected]dc462d782012-11-21 21:43:0131 this->clip_rect = clip_rect;
32 this->is_clipped = is_clipped;
[email protected]cb7af742012-11-21 04:02:2433 this->opacity = opacity;
[email protected]0f077a52012-09-08 01:45:2434}
35
[email protected]db124002012-10-09 02:34:4236} // namespace cc