| 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/quads/tile_draw_quad.h" | 5 #include "cc/quads/tile_draw_quad.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/values.h" | 8 #include "base/values.h" |
| 9 #include "third_party/khronos/GLES2/gl2.h" | 9 #include "third_party/khronos/GLES2/gl2.h" |
| 10 | 10 |
| 11 namespace cc { | 11 namespace cc { |
| 12 | 12 |
| 13 TileDrawQuad::TileDrawQuad() | 13 TileDrawQuad::TileDrawQuad() |
| 14 : resource_id(0) { | 14 : resource_id(0) { |
| 15 } | 15 } |
| 16 | 16 |
| 17 TileDrawQuad::~TileDrawQuad() { | 17 TileDrawQuad::~TileDrawQuad() { |
| 18 } | 18 } |
| 19 | 19 |
| 20 scoped_ptr<TileDrawQuad> TileDrawQuad::Create() { | |
| 21 return make_scoped_ptr(new TileDrawQuad); | |
| 22 } | |
| 23 | |
| 24 void TileDrawQuad::SetNew(const SharedQuadState* shared_quad_state, | 20 void TileDrawQuad::SetNew(const SharedQuadState* shared_quad_state, |
| 25 const gfx::Rect& rect, | 21 const gfx::Rect& rect, |
| 26 const gfx::Rect& opaque_rect, | 22 const gfx::Rect& opaque_rect, |
| 27 const gfx::Rect& visible_rect, | 23 const gfx::Rect& visible_rect, |
| 28 unsigned resource_id, | 24 unsigned resource_id, |
| 29 const gfx::RectF& tex_coord_rect, | 25 const gfx::RectF& tex_coord_rect, |
| 30 const gfx::Size& texture_size, | 26 const gfx::Size& texture_size, |
| 31 bool swizzle_contents) { | 27 bool swizzle_contents) { |
| 32 ContentDrawQuadBase::SetNew(shared_quad_state, | 28 ContentDrawQuadBase::SetNew(shared_quad_state, |
| 33 DrawQuad::TILED_CONTENT, | 29 DrawQuad::TILED_CONTENT, |
| (...skipping 30 matching lines...) Expand all Loading... |
| 64 DCHECK(quad->material == DrawQuad::TILED_CONTENT); | 60 DCHECK(quad->material == DrawQuad::TILED_CONTENT); |
| 65 return static_cast<const TileDrawQuad*>(quad); | 61 return static_cast<const TileDrawQuad*>(quad); |
| 66 } | 62 } |
| 67 | 63 |
| 68 void TileDrawQuad::ExtendValue(base::DictionaryValue* value) const { | 64 void TileDrawQuad::ExtendValue(base::DictionaryValue* value) const { |
| 69 ContentDrawQuadBase::ExtendValue(value); | 65 ContentDrawQuadBase::ExtendValue(value); |
| 70 value->SetInteger("resource_id", resource_id); | 66 value->SetInteger("resource_id", resource_id); |
| 71 } | 67 } |
| 72 | 68 |
| 73 } // namespace cc | 69 } // namespace cc |
| OLD | NEW |