Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2573)

Unified Diff: cc/quads/tile_draw_quad.cc

Issue 12642010: Implement on demand quad rasterization for PicturePiles. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: build fix. Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: cc/quads/tile_draw_quad.cc
diff --git a/cc/quads/tile_draw_quad.cc b/cc/quads/tile_draw_quad.cc
index 04c473834cba42f72d7d85e6221f832182948551..19f6592ed50e4d9b5f4fa1a337f1922a22365aad 100644
--- a/cc/quads/tile_draw_quad.cc
+++ b/cc/quads/tile_draw_quad.cc
@@ -10,8 +10,10 @@
namespace cc {
TileDrawQuad::TileDrawQuad()
- : resource_id(0),
- swizzle_contents(false) {
+ : resource_id(0) {
+}
+
+TileDrawQuad::~TileDrawQuad() {
}
scoped_ptr<TileDrawQuad> TileDrawQuad::Create() {
@@ -19,37 +21,31 @@ scoped_ptr<TileDrawQuad> TileDrawQuad::Create() {
}
void TileDrawQuad::SetNew(const SharedQuadState* shared_quad_state,
- gfx::Rect rect,
- gfx::Rect opaque_rect,
+ const gfx::Rect& rect,
+ const gfx::Rect& opaque_rect,
unsigned resource_id,
const gfx::RectF& tex_coord_rect,
- gfx::Size texture_size,
+ const gfx::Size& texture_size,
bool swizzle_contents) {
- gfx::Rect visible_rect = rect;
- bool needs_blending = false;
- DrawQuad::SetAll(shared_quad_state, DrawQuad::TILED_CONTENT, rect,
- opaque_rect, visible_rect, needs_blending);
+ TileDrawQuadBase::SetNew(shared_quad_state, DrawQuad::TILED_CONTENT, rect,
+ opaque_rect, tex_coord_rect, texture_size,
+ swizzle_contents);
this->resource_id = resource_id;
- this->tex_coord_rect = tex_coord_rect;
- this->texture_size = texture_size;
- this->swizzle_contents = swizzle_contents;
}
void TileDrawQuad::SetAll(const SharedQuadState* shared_quad_state,
- gfx::Rect rect,
- gfx::Rect opaque_rect,
- gfx::Rect visible_rect,
+ const gfx::Rect& rect,
+ const gfx::Rect& opaque_rect,
+ const gfx::Rect& visible_rect,
bool needs_blending,
unsigned resource_id,
const gfx::RectF& tex_coord_rect,
- gfx::Size texture_size,
+ const gfx::Size& texture_size,
bool swizzle_contents) {
- DrawQuad::SetAll(shared_quad_state, DrawQuad::TILED_CONTENT, rect,
- opaque_rect, visible_rect, needs_blending);
+ TileDrawQuadBase::SetAll(shared_quad_state, DrawQuad::TILED_CONTENT, rect,
+ opaque_rect, visible_rect, needs_blending,
+ tex_coord_rect, texture_size, swizzle_contents);
this->resource_id = resource_id;
- this->tex_coord_rect = tex_coord_rect;
- this->texture_size = texture_size;
- this->swizzle_contents = swizzle_contents;
}
void TileDrawQuad::IterateResources(
@@ -57,8 +53,7 @@ void TileDrawQuad::IterateResources(
resource_id = callback.Run(resource_id);
}
-const TileDrawQuad* TileDrawQuad::MaterialCast(
- const DrawQuad* quad) {
+const TileDrawQuad* TileDrawQuad::MaterialCast(const DrawQuad* quad) {
DCHECK(quad->material == DrawQuad::TILED_CONTENT);
return static_cast<const TileDrawQuad*>(quad);
}

Powered by Google App Engine
This is Rietveld 408576698