| Index: cc/quads/picture_draw_quad.cc
|
| diff --git a/cc/quads/picture_draw_quad.cc b/cc/quads/picture_draw_quad.cc
|
| index 0494764d8aaec4137d509c40bd0cdb4696d3ae73..e566b247f721873a0bb31fe69779731968cc770c 100644
|
| --- a/cc/quads/picture_draw_quad.cc
|
| +++ b/cc/quads/picture_draw_quad.cc
|
| @@ -6,6 +6,7 @@
|
|
|
| #include "base/values.h"
|
| #include "cc/base/math_util.h"
|
| +#include "cc/resources/platform_color.h"
|
|
|
| namespace cc {
|
|
|
| @@ -24,18 +25,24 @@ void PictureDrawQuad::SetNew(const SharedQuadState* shared_quad_state,
|
| gfx::Rect opaque_rect,
|
| const gfx::RectF& tex_coord_rect,
|
| gfx::Size texture_size,
|
| - bool swizzle_contents,
|
| + ResourceFormat texture_format,
|
| gfx::Rect content_rect,
|
| float contents_scale,
|
| bool can_draw_direct_to_backbuffer,
|
| scoped_refptr<PicturePileImpl> picture_pile) {
|
| - ContentDrawQuadBase::SetNew(shared_quad_state, DrawQuad::PICTURE_CONTENT,
|
| - rect, opaque_rect, tex_coord_rect, texture_size,
|
| - swizzle_contents);
|
| + ContentDrawQuadBase::SetNew(shared_quad_state,
|
| + DrawQuad::PICTURE_CONTENT,
|
| + rect,
|
| + opaque_rect,
|
| + tex_coord_rect,
|
| + texture_size,
|
| + !PlatformColor::SameComponentOrder(
|
| + texture_format));
|
| this->content_rect = content_rect;
|
| this->contents_scale = contents_scale;
|
| this->can_draw_direct_to_backbuffer = can_draw_direct_to_backbuffer;
|
| this->picture_pile = picture_pile;
|
| + this->texture_format = texture_format;
|
| }
|
|
|
| void PictureDrawQuad::SetAll(const SharedQuadState* shared_quad_state,
|
| @@ -45,19 +52,26 @@ void PictureDrawQuad::SetAll(const SharedQuadState* shared_quad_state,
|
| bool needs_blending,
|
| const gfx::RectF& tex_coord_rect,
|
| gfx::Size texture_size,
|
| - bool swizzle_contents,
|
| + ResourceFormat texture_format,
|
| gfx::Rect content_rect,
|
| float contents_scale,
|
| bool can_draw_direct_to_backbuffer,
|
| scoped_refptr<PicturePileImpl> picture_pile) {
|
| ContentDrawQuadBase::SetAll(shared_quad_state,
|
| - DrawQuad::PICTURE_CONTENT, rect, opaque_rect,
|
| - visible_rect, needs_blending, tex_coord_rect,
|
| - texture_size, swizzle_contents);
|
| + DrawQuad::PICTURE_CONTENT,
|
| + rect,
|
| + opaque_rect,
|
| + visible_rect,
|
| + needs_blending,
|
| + tex_coord_rect,
|
| + texture_size,
|
| + !PlatformColor::SameComponentOrder(
|
| + texture_format));
|
| this->content_rect = content_rect;
|
| this->contents_scale = contents_scale;
|
| this->can_draw_direct_to_backbuffer = can_draw_direct_to_backbuffer;
|
| this->picture_pile = picture_pile;
|
| + this->texture_format = texture_format;
|
| }
|
|
|
| void PictureDrawQuad::IterateResources(
|
| @@ -77,6 +91,7 @@ void PictureDrawQuad::ExtendValue(base::DictionaryValue* value) const {
|
| value->SetDouble("contents_scale", contents_scale);
|
| value->SetBoolean("can_draw_direct_to_backbuffer",
|
| can_draw_direct_to_backbuffer);
|
| + value->SetInteger("texture_format", texture_format);
|
| // TODO(piman): picture_pile?
|
| }
|
|
|
|
|