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

Unified Diff: cc/quads/picture_draw_quad.cc

Issue 21159007: cc: Adding support for RGBA_4444 tile textures (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed a signed vs. unsigned comparison in video_resource_updater.cc Created 7 years, 3 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
« no previous file with comments | « cc/quads/picture_draw_quad.h ('k') | cc/resources/image_raster_worker_pool.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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?
}
« no previous file with comments | « cc/quads/picture_draw_quad.h ('k') | cc/resources/image_raster_worker_pool.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698