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

Unified Diff: cc/layers/picture_layer_impl.cc

Issue 1357423009: gfx: Make conversions from Size to SizeF be explicit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
Index: cc/layers/picture_layer_impl.cc
diff --git a/cc/layers/picture_layer_impl.cc b/cc/layers/picture_layer_impl.cc
index 740555f9f442773bbfe00af2525ebdbd9aa219b5..410bc1ded2234e803ff3bffd734912590a7c5725 100644
--- a/cc/layers/picture_layer_impl.cc
+++ b/cc/layers/picture_layer_impl.cc
@@ -197,7 +197,7 @@ void PictureLayerImpl::AppendQuads(RenderPass* render_pass,
DCHECK(raster_source_->HasRecordings());
gfx::Rect quad_content_rect = shared_quad_state->visible_quad_layer_rect;
gfx::Size texture_size = quad_content_rect.size();
- gfx::RectF texture_rect = gfx::RectF(texture_size);
+ gfx::RectF texture_rect = gfx::RectF(gfx::SizeF(texture_size));
PictureDrawQuad* quad =
render_pass->CreateAndAppendDrawQuad<PictureDrawQuad>();
@@ -977,8 +977,8 @@ void PictureLayerImpl::RecalculateRasterScales() {
float maximum_scale = draw_properties().maximum_animation_contents_scale;
float starting_scale = draw_properties().starting_animation_contents_scale;
if (maximum_scale) {
- gfx::Size bounds_at_maximum_scale = gfx::ToCeiledSize(
- gfx::ScaleSize(raster_source_->GetSize(), maximum_scale));
+ gfx::Size bounds_at_maximum_scale =
+ gfx::ScaleToCeiledSize(raster_source_->GetSize(), maximum_scale);
int64 maximum_area = static_cast<int64>(bounds_at_maximum_scale.width()) *
static_cast<int64>(bounds_at_maximum_scale.height());
gfx::Size viewport = layer_tree_impl()->device_viewport_size();
@@ -988,8 +988,8 @@ void PictureLayerImpl::RecalculateRasterScales() {
can_raster_at_maximum_scale = true;
}
if (starting_scale && starting_scale > maximum_scale) {
- gfx::Size bounds_at_starting_scale = gfx::ToCeiledSize(
- gfx::ScaleSize(raster_source_->GetSize(), starting_scale));
+ gfx::Size bounds_at_starting_scale =
+ gfx::ScaleToCeiledSize(raster_source_->GetSize(), starting_scale);
int64 start_area = static_cast<int64>(bounds_at_starting_scale.width()) *
static_cast<int64>(bounds_at_starting_scale.height());
gfx::Size viewport = layer_tree_impl()->device_viewport_size();
@@ -1018,8 +1018,8 @@ void PictureLayerImpl::RecalculateRasterScales() {
// If this layer would create zero or one tiles at this content scale,
// don't create a low res tiling.
- gfx::Size raster_bounds = gfx::ToCeiledSize(
- gfx::ScaleSize(raster_source_->GetSize(), raster_contents_scale_));
+ gfx::Size raster_bounds =
+ gfx::ScaleToCeiledSize(raster_source_->GetSize(), raster_contents_scale_);
gfx::Size tile_size = CalculateTileSize(raster_bounds);
bool tile_covers_bounds = tile_size.width() >= raster_bounds.width() &&
tile_size.height() >= raster_bounds.height();

Powered by Google App Engine
This is Rietveld 408576698