summaryrefslogtreecommitdiffstats
path: root/cc
diff options
context:
space:
mode:
authorwjmaclean@chromium.org <wjmaclean@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-02 03:38:46 +0000
committerwjmaclean@chromium.org <wjmaclean@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-02 03:38:46 +0000
commit011dfbca43d7c8eb055cb86ab0bed143ffca813d (patch)
tree33aca29bb31dc0e9023d6a114364f8bbbb86129f /cc
parentbf94fb2f5be27c01efcb4cc1aadf0f74d93620d6 (diff)
downloadchromium_src-011dfbca43d7c8eb055cb86ab0bed143ffca813d.zip
chromium_src-011dfbca43d7c8eb055cb86ab0bed143ffca813d.tar.gz
chromium_src-011dfbca43d7c8eb055cb86ab0bed143ffca813d.tar.bz2
Remove dead code cc::Layer, cc::WebLayerImpl
All of the code removed in this CL is dead, and is not expected to be used again. Review URL: https://codereview.chromium.org/221053002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@261044 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc')
-rw-r--r--cc/layers/layer.cc34
-rw-r--r--cc/layers/layer.h1
2 files changed, 0 insertions, 35 deletions
diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc
index f2eadce..8a2b7e4 100644
--- a/cc/layers/layer.cc
+++ b/cc/layers/layer.cc
@@ -696,40 +696,6 @@ void Layer::SetScrollOffsetFromImplSide(const gfx::Vector2d& scroll_offset) {
// "this" may have been destroyed during the process.
}
-// TODO(wjmaclean) We should template this and put it into LayerTreeHostCommon
-// so that both Layer and LayerImpl are using the same code. In order
-// to template it we should avoid calling layer_tree_host() by giving
-// Layer/LayerImpl local accessors for page_scale_layer() and
-// page_scale_factor().
-gfx::Vector2d Layer::MaxScrollOffset() const {
- if (scroll_clip_layer_id_ == INVALID_ID)
- return gfx::Vector2d();
-
- gfx::Size scaled_scroll_bounds(bounds());
- Layer const* current_layer = this;
- Layer const* page_scale_layer = layer_tree_host()->page_scale_layer();
- float scale_factor = 1.f;
- do {
- if (current_layer == page_scale_layer) {
- scale_factor = layer_tree_host()->page_scale_factor();
- scaled_scroll_bounds.SetSize(
- scale_factor * scaled_scroll_bounds.width(),
- scale_factor * scaled_scroll_bounds.height());
- }
- current_layer = current_layer->parent();
- } while (current_layer && current_layer->id() != scroll_clip_layer_id_);
- DCHECK(current_layer);
- DCHECK(current_layer->id() == scroll_clip_layer_id_);
-
- gfx::Vector2dF max_offset(
- scaled_scroll_bounds.width() - current_layer->bounds().width(),
- scaled_scroll_bounds.height() - current_layer->bounds().height());
- // We need the final scroll offset to be in CSS coords.
- max_offset.Scale(1.f / scale_factor);
- max_offset.SetToMax(gfx::Vector2dF());
- return gfx::ToFlooredVector2d(max_offset);
-}
-
void Layer::SetScrollClipLayerId(int clip_layer_id) {
DCHECK(IsPropertyChangeAllowed());
if (scroll_clip_layer_id_ == clip_layer_id)
diff --git a/cc/layers/layer.h b/cc/layers/layer.h
index 0a4b62d..ed66e7b 100644
--- a/cc/layers/layer.h
+++ b/cc/layers/layer.h
@@ -265,7 +265,6 @@ class CC_EXPORT Layer : public base::RefCounted<Layer>,
gfx::Vector2d scroll_offset() const { return scroll_offset_; }
void SetScrollOffsetFromImplSide(const gfx::Vector2d& scroll_offset);
- gfx::Vector2d MaxScrollOffset() const;
void SetScrollClipLayerId(int clip_layer_id);
bool scrollable() const { return scroll_clip_layer_id_ != INVALID_ID; }