OLD | NEW |
(Empty) | |
| 1 // Copyright 2013 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 |
| 5 #include "cc/quads/content_draw_quad_base.h" |
| 6 |
| 7 #include "base/logging.h" |
| 8 |
| 9 namespace cc { |
| 10 |
| 11 ContentDrawQuadBase::ContentDrawQuadBase() |
| 12 : swizzle_contents(false) { |
| 13 } |
| 14 |
| 15 ContentDrawQuadBase::~ContentDrawQuadBase() { |
| 16 } |
| 17 |
| 18 void ContentDrawQuadBase::SetNew(const SharedQuadState* shared_quad_state, |
| 19 DrawQuad::Material material, |
| 20 gfx::Rect rect, |
| 21 gfx::Rect opaque_rect, |
| 22 const gfx::RectF& tex_coord_rect, |
| 23 gfx::Size texture_size, |
| 24 bool swizzle_contents) { |
| 25 gfx::Rect visible_rect = rect; |
| 26 bool needs_blending = false; |
| 27 DrawQuad::SetAll(shared_quad_state, material, rect, opaque_rect, |
| 28 visible_rect, needs_blending); |
| 29 this->tex_coord_rect = tex_coord_rect; |
| 30 this->texture_size = texture_size; |
| 31 this->swizzle_contents = swizzle_contents; |
| 32 } |
| 33 |
| 34 void ContentDrawQuadBase::SetAll(const SharedQuadState* shared_quad_state, |
| 35 DrawQuad::Material material, |
| 36 gfx::Rect rect, |
| 37 gfx::Rect opaque_rect, |
| 38 gfx::Rect visible_rect, |
| 39 bool needs_blending, |
| 40 const gfx::RectF& tex_coord_rect, |
| 41 gfx::Size texture_size, |
| 42 bool swizzle_contents) { |
| 43 DrawQuad::SetAll(shared_quad_state, material, rect, opaque_rect, |
| 44 visible_rect, needs_blending); |
| 45 this->tex_coord_rect = tex_coord_rect; |
| 46 this->texture_size = texture_size; |
| 47 this->swizzle_contents = swizzle_contents; |
| 48 } |
| 49 |
| 50 } // namespace cc |
OLD | NEW |