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

Unified Diff: cc/trees/layer_tree_host_impl.h

Issue 986443003: Move viewport scrolling logic into separate class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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/trees/layer_tree_host_impl.h
diff --git a/cc/trees/layer_tree_host_impl.h b/cc/trees/layer_tree_host_impl.h
index 73ed039e582363026274a82024477ab30b26ad71..b4d3782f5b9262b9cccef648b5301330326dbd24 100644
--- a/cc/trees/layer_tree_host_impl.h
+++ b/cc/trees/layer_tree_host_impl.h
@@ -63,6 +63,7 @@ class TextureMailboxDeleter;
class TopControlsManager;
class UIResourceBitmap;
class UIResourceRequest;
+class Viewport;
struct RendererCapabilitiesImpl;
enum class GpuRasterizationStatus {
@@ -522,6 +523,15 @@ class CC_EXPORT LayerTreeHostImpl
return frame_timing_tracker_.get();
}
+ gfx::Vector2dF ScrollLayerWithViewportSpaceDelta(
+ LayerImpl* layer_impl,
+ const gfx::PointF& viewport_point,
+ const gfx::Vector2dF& viewport_delta);
+ gfx::Vector2dF ScrollLayerWithLocalDelta(
+ LayerImpl* layer_impl,
+ const gfx::Vector2dF& local_delta,
+ float page_scale_factor) const;
+
protected:
LayerTreeHostImpl(
const LayerTreeSettings& settings,
@@ -549,6 +559,8 @@ class CC_EXPORT LayerTreeHostImpl
bool IsSynchronousSingleThreaded() const;
+ Viewport* Viewport();
+
// Scroll by preferring to move the outer viewport first, only moving the
// inner if the outer is at its scroll extents.
void ScrollViewportBy(gfx::Vector2dF scroll_delta);
@@ -559,14 +571,6 @@ class CC_EXPORT LayerTreeHostImpl
void AnimateScrollbars(base::TimeTicks monotonic_time);
void AnimateTopControls(base::TimeTicks monotonic_time);
- bool ShouldTopControlsConsumeScroll(const gfx::Vector2dF& scroll_delta) const;
-
- gfx::Vector2dF ScrollLayerWithViewportSpaceDelta(
- LayerImpl* layer_impl,
- float scale_from_viewport_to_screen_space,
- const gfx::PointF& viewport_point,
- const gfx::Vector2dF& viewport_delta);
-
void TrackDamageForAllSurfaces(
LayerImpl* root_draw_layer,
const LayerImplList& render_surface_layer_list);

Powered by Google App Engine
This is Rietveld 408576698