Separate projection mode from rest of touch HUD
[chromium-blink-merge.git] / cc / quads / shared_quad_state.cc
blob7bfb2b440f378b9333383add131a297eabb71fa3
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"
7 namespace cc {
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,
25 gfx::Rect clip_rect,
26 bool is_clipped,
27 float opacity) {
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;
36 } // namespace cc