Merge from Chromium at DEPS revision 224184
This commit was generated by merge_to_master.py.
Change-Id: Ia3424df5abed9bea642c522b9e2358dceabd8423
diff --git a/cc/quads/picture_draw_quad.cc b/cc/quads/picture_draw_quad.cc
index 0494764..e566b24 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 @@
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 @@
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 @@
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?
}