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

Unified Diff: cc/trees/layer_tree_impl.cc

Issue 53303006: Only draw the overhang pattern on overhang areas. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use root scroll layer's first child Created 7 years, 1 month 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/trees/layer_tree_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_impl.cc
diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc
index 4604043663920750438b5de260b0d8a0249d36b2..ad4060f04c8158b2fbd90abd783fb0682017e27b 100644
--- a/cc/trees/layer_tree_impl.cc
+++ b/cc/trees/layer_tree_impl.cc
@@ -7,6 +7,8 @@
#include "base/debug/trace_event.h"
#include "cc/animation/keyframed_animation_curve.h"
#include "cc/animation/scrollbar_animation_controller.h"
+#include "cc/base/math_util.h"
+#include "cc/base/util.h"
#include "cc/debug/traced_value.h"
#include "cc/layers/heads_up_display_layer_impl.h"
#include "cc/layers/layer.h"
@@ -238,6 +240,15 @@ gfx::SizeF LayerTreeImpl::ScrollableViewportSize() const {
1.0f / total_page_scale_factor());
}
+gfx::Rect LayerTreeImpl::RootScrollLayerDeviceViewportBounds() const {
+ if (!root_scroll_layer_ || root_scroll_layer_->children().empty())
+ return gfx::Rect();
+ LayerImpl* layer = root_scroll_layer_->children()[0];
+ return MathUtil::MapClippedRect(
+ layer->screen_space_transform(),
+ gfx::Rect(layer->content_bounds()));
+}
+
void LayerTreeImpl::UpdateMaxScrollOffset() {
LayerImpl* root_scroll = RootScrollLayer();
if (!root_scroll || !root_scroll->children().size())
« no previous file with comments | « cc/trees/layer_tree_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698