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

Side by Side Diff: ui/compositor/layer.h

Issue 2188133002: Scroll with Layers in views::ScrollView (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@20160728-MacViews-ScrollTrack
Patch Set: bugref, scale_delta DCHECK + comment Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « ui/compositor/compositor.cc ('k') | ui/compositor/layer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_COMPOSITOR_LAYER_H_ 5 #ifndef UI_COMPOSITOR_LAYER_H_
6 #define UI_COMPOSITOR_LAYER_H_ 6 #define UI_COMPOSITOR_LAYER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 // Notifies the layer that the device scale factor has changed. 348 // Notifies the layer that the device scale factor has changed.
349 void OnDeviceScaleFactorChanged(float device_scale_factor); 349 void OnDeviceScaleFactorChanged(float device_scale_factor);
350 350
351 // Notifies the layer that one of its children has received a new 351 // Notifies the layer that one of its children has received a new
352 // delegated frame. 352 // delegated frame.
353 void OnDelegatedFrameDamage(const gfx::Rect& damage_rect_in_dip); 353 void OnDelegatedFrameDamage(const gfx::Rect& damage_rect_in_dip);
354 354
355 // Requets a copy of the layer's output as a texture or bitmap. 355 // Requets a copy of the layer's output as a texture or bitmap.
356 void RequestCopyOfOutput(std::unique_ptr<cc::CopyOutputRequest> request); 356 void RequestCopyOfOutput(std::unique_ptr<cc::CopyOutputRequest> request);
357 357
358 // Makes this Layer scrollable, clipping to |parent_clip_layer|. |on_scroll|
359 // is invoked when scrolling performed by the cc::InputHandler is committed.
360 void SetScrollable(Layer* parent_clip_layer, const base::Closure& on_scroll);
361
362 // Gets and sets the current scroll offset of the layer.
363 gfx::ScrollOffset CurrentScrollOffset() const;
364 void SetScrollOffset(const gfx::ScrollOffset& offset);
365
358 // ContentLayerClient 366 // ContentLayerClient
359 gfx::Rect PaintableRegion() override; 367 gfx::Rect PaintableRegion() override;
360 scoped_refptr<cc::DisplayItemList> PaintContentsToDisplayList( 368 scoped_refptr<cc::DisplayItemList> PaintContentsToDisplayList(
361 ContentLayerClient::PaintingControlSetting painting_control) override; 369 ContentLayerClient::PaintingControlSetting painting_control) override;
362 bool FillsBoundsCompletely() const override; 370 bool FillsBoundsCompletely() const override;
363 size_t GetApproximateUnsharedMemoryUsage() const override; 371 size_t GetApproximateUnsharedMemoryUsage() const override;
364 372
365 cc::Layer* cc_layer_for_testing() { return cc_layer_; } 373 cc::Layer* cc_layer_for_testing() { return cc_layer_; }
366 374
367 // TextureLayerClient 375 // TextureLayerClient
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 // The texture scale. 541 // The texture scale.
534 float texture_x_scale_; 542 float texture_x_scale_;
535 float texture_y_scale_; 543 float texture_y_scale_;
536 544
537 DISALLOW_COPY_AND_ASSIGN(Layer); 545 DISALLOW_COPY_AND_ASSIGN(Layer);
538 }; 546 };
539 547
540 } // namespace ui 548 } // namespace ui
541 549
542 #endif // UI_COMPOSITOR_LAYER_H_ 550 #endif // UI_COMPOSITOR_LAYER_H_
OLDNEW
« no previous file with comments | « ui/compositor/compositor.cc ('k') | ui/compositor/layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698