| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "config.h" | |
| 6 | |
| 7 #include "cc/shared_quad_state.h" | 5 #include "cc/shared_quad_state.h" |
| 8 | 6 |
| 9 namespace cc { | 7 namespace cc { |
| 10 | 8 |
| 11 scoped_ptr<SharedQuadState> SharedQuadState::create(const WebKit::WebTransformat
ionMatrix& quadTransform, const gfx::Rect& visibleContentRect, const gfx::Rect&
clippedRectInTarget, float opacity, bool opaque) | 9 scoped_ptr<SharedQuadState> SharedQuadState::create(const WebKit::WebTransformat
ionMatrix& quadTransform, const gfx::Rect& visibleContentRect, const gfx::Rect&
clippedRectInTarget, float opacity, bool opaque) |
| 12 { | 10 { |
| 13 return make_scoped_ptr(new SharedQuadState(quadTransform, visibleContentRect
, clippedRectInTarget, opacity, opaque)); | 11 return make_scoped_ptr(new SharedQuadState(quadTransform, visibleContentRect
, clippedRectInTarget, opacity, opaque)); |
| 14 } | 12 } |
| 15 | 13 |
| 16 SharedQuadState::SharedQuadState(const WebKit::WebTransformationMatrix& quadTran
sform, const gfx::Rect& visibleContentRect, const gfx::Rect& clippedRectInTarget
, float opacity, bool opaque) | 14 SharedQuadState::SharedQuadState(const WebKit::WebTransformationMatrix& quadTran
sform, const gfx::Rect& visibleContentRect, const gfx::Rect& clippedRectInTarget
, float opacity, bool opaque) |
| 17 : id(-1) | 15 : id(-1) |
| 18 , quadTransform(quadTransform) | 16 , quadTransform(quadTransform) |
| 19 , visibleContentRect(visibleContentRect) | 17 , visibleContentRect(visibleContentRect) |
| 20 , clippedRectInTarget(clippedRectInTarget) | 18 , clippedRectInTarget(clippedRectInTarget) |
| 21 , opacity(opacity) | 19 , opacity(opacity) |
| 22 , opaque(opaque) | 20 , opaque(opaque) |
| 23 { | 21 { |
| 24 } | 22 } |
| 25 | 23 |
| 26 scoped_ptr<SharedQuadState> SharedQuadState::copy() const | 24 scoped_ptr<SharedQuadState> SharedQuadState::copy() const |
| 27 { | 25 { |
| 28 scoped_ptr<SharedQuadState> copiedState(create(quadTransform, visibleContent
Rect, clippedRectInTarget, opacity, opaque)); | 26 scoped_ptr<SharedQuadState> copiedState(create(quadTransform, visibleContent
Rect, clippedRectInTarget, opacity, opaque)); |
| 29 copiedState->id = id; | 27 copiedState->id = id; |
| 30 return copiedState.Pass(); | 28 return copiedState.Pass(); |
| 31 } | 29 } |
| 32 | 30 |
| 33 } // namespace cc | 31 } // namespace cc |
| OLD | NEW |