| 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 "cc/io_surface_draw_quad.h" | 5 #include "cc/io_surface_draw_quad.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 | 8 |
| 9 namespace cc { | 9 namespace cc { |
| 10 | 10 |
| 11 scoped_ptr<IOSurfaceDrawQuad> IOSurfaceDrawQuad::create(const SharedQuadState* s
haredQuadState, const gfx::Rect& quadRect, const gfx::Rect& opaqueRect, const gf
x::Size& ioSurfaceSize, unsigned ioSurfaceTextureId, Orientation orientation) | 11 scoped_ptr<IOSurfaceDrawQuad> IOSurfaceDrawQuad::create(const SharedQuadState* s
haredQuadState, const gfx::Rect& quadRect, const gfx::Rect& opaqueRect, const gf
x::Size& ioSurfaceSize, unsigned ioSurfaceTextureId, Orientation orientation) |
| 12 { | 12 { |
| 13 return make_scoped_ptr(new IOSurfaceDrawQuad(sharedQuadState, quadRect, opaq
ueRect, ioSurfaceSize, ioSurfaceTextureId, orientation)); | 13 return make_scoped_ptr(new IOSurfaceDrawQuad(sharedQuadState, quadRect, opaq
ueRect, ioSurfaceSize, ioSurfaceTextureId, orientation)); |
| 14 } | 14 } |
| 15 | 15 |
| 16 IOSurfaceDrawQuad::IOSurfaceDrawQuad(const SharedQuadState* sharedQuadState, con
st gfx::Rect& quadRect, const gfx::Rect& opaqueRect, const gfx::Size& ioSurfaceS
ize, unsigned ioSurfaceTextureId, Orientation orientation) | 16 IOSurfaceDrawQuad::IOSurfaceDrawQuad(const SharedQuadState* sharedQuadState, con
st gfx::Rect& quadRect, const gfx::Rect& opaqueRect, const gfx::Size& ioSurfaceS
ize, unsigned ioSurfaceTextureId, Orientation orientation) |
| 17 : DrawQuad(sharedQuadState, DrawQuad::IO_SURFACE_CONTENT, quadRect, opaqueRe
ct) | 17 : m_ioSurfaceSize(ioSurfaceSize) |
| 18 , m_ioSurfaceSize(ioSurfaceSize) | |
| 19 , m_ioSurfaceTextureId(ioSurfaceTextureId) | 18 , m_ioSurfaceTextureId(ioSurfaceTextureId) |
| 20 , m_orientation(orientation) | 19 , m_orientation(orientation) |
| 21 { | 20 { |
| 21 gfx::Rect visibleRect = quadRect; |
| 22 bool needsBlending = false; |
| 23 DrawQuad::SetAll(sharedQuadState, DrawQuad::IO_SURFACE_CONTENT, quadRect, op
aqueRect, visibleRect, needsBlending); |
| 22 } | 24 } |
| 23 | 25 |
| 24 const IOSurfaceDrawQuad* IOSurfaceDrawQuad::materialCast(const DrawQuad* quad) | 26 const IOSurfaceDrawQuad* IOSurfaceDrawQuad::materialCast(const DrawQuad* quad) |
| 25 { | 27 { |
| 26 DCHECK(quad->material() == DrawQuad::IO_SURFACE_CONTENT); | 28 DCHECK(quad->material == DrawQuad::IO_SURFACE_CONTENT); |
| 27 return static_cast<const IOSurfaceDrawQuad*>(quad); | 29 return static_cast<const IOSurfaceDrawQuad*>(quad); |
| 28 } | 30 } |
| 29 | 31 |
| 30 } // namespace cc | 32 } // namespace cc |
| OLD | NEW |