summaryrefslogtreecommitdiffstats
path: root/cc/layers/picture_layer.cc
diff options
context:
space:
mode:
authorbokan <bokan@chromium.org>2014-10-07 03:33:05 -0700
committerCommit bot <commit-bot@chromium.org>2014-10-07 10:33:28 +0000
commitc7935852d9590e2456e92c4ad2d0b48c816ec5ed (patch)
tree6ab0e88b8d6df69b953d99fb21ee5d021d4202c5 /cc/layers/picture_layer.cc
parent72b343fbeb63c67cd80c1cfa5a866b3360f9ca92 (diff)
downloadchromium_src-c7935852d9590e2456e92c4ad2d0b48c816ec5ed.zip
chromium_src-c7935852d9590e2456e92c4ad2d0b48c816ec5ed.tar.gz
chromium_src-c7935852d9590e2456e92c4ad2d0b48c816ec5ed.tar.bz2
Converted LayerImpl::bounds() to return SizeF.
Since bounds includes bounds_delta, which is SizeF, it makes sense to return the floating point sum of these two values. In call sites broken by the change, the returned value is converted to Size using ToCeiledSize to preserve the current snapping behavior, though in most (all?) these cases the layer bounds are expected to be integral anyway. BUG= Review URL: https://codereview.chromium.org/634683003 Cr-Commit-Position: refs/heads/master@{#298439}
Diffstat (limited to 'cc/layers/picture_layer.cc')
-rw-r--r--cc/layers/picture_layer.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/cc/layers/picture_layer.cc b/cc/layers/picture_layer.cc
index 68d24ba..d86aef7 100644
--- a/cc/layers/picture_layer.cc
+++ b/cc/layers/picture_layer.cc
@@ -9,6 +9,7 @@
#include "cc/layers/picture_layer_impl.h"
#include "cc/trees/layer_tree_impl.h"
#include "third_party/skia/include/core/SkPictureRecorder.h"
+#include "ui/gfx/geometry/size_conversions.h"
#include "ui/gfx/rect_conversions.h"
namespace cc {
@@ -46,7 +47,8 @@ void PictureLayer::PushPropertiesTo(LayerImpl* base_layer) {
// TODO(ernstm): This DCHECK is only valid as long as the pile's tiling_rect
// is identical to the layer_rect.
// If update called, then pile size must match bounds pushed to impl layer.
- DCHECK_EQ(layer_impl->bounds().ToString(), pile_->tiling_size().ToString());
+ DCHECK_EQ(gfx::ToCeiledSize(layer_impl->bounds()).ToString(),
+ pile_->tiling_size().ToString());
}
// Unlike other properties, invalidation must always be set on layer_impl.