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

Unified Diff: cc/layers/scrollbar_layer.h

Issue 21555004: Scrollbar Layer revert (Closed) Base URL: https://src.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 5 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
« no previous file with comments | « no previous file | cc/layers/scrollbar_layer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/scrollbar_layer.h
===================================================================
--- cc/layers/scrollbar_layer.h (revision 215030)
+++ cc/layers/scrollbar_layer.h (working copy)
@@ -10,9 +10,10 @@
#include "cc/layers/contents_scaling_layer.h"
#include "cc/layers/scrollbar_theme_painter.h"
#include "cc/resources/layer_updater.h"
-#include "cc/resources/scoped_ui_resource.h"
namespace cc {
+class CachingBitmapContentLayerUpdater;
+class ResourceUpdateQueue;
class ScrollbarThemeComposite;
class CC_EXPORT ScrollbarLayer : public ContentsScalingLayer {
@@ -32,6 +33,8 @@
ScrollbarOrientation Orientation() const;
// Layer interface
+ virtual void SetTexturePriorities(const PriorityCalculator& priority_calc)
+ OVERRIDE;
virtual bool Update(ResourceUpdateQueue* queue,
const OcclusionTracker* occlusion) OVERRIDE;
virtual void SetLayerTreeHost(LayerTreeHost* host) OVERRIDE;
@@ -52,26 +55,37 @@
virtual ~ScrollbarLayer();
private:
+ bool UpdatePart(CachingBitmapContentLayerUpdater* painter,
+ LayerUpdater::Resource* resource,
+ gfx::Rect rect,
+ ResourceUpdateQueue* queue);
+ void CreateUpdaterIfNeeded();
gfx::Rect ScrollbarLayerRectToContentRect(gfx::Rect layer_rect) const;
gfx::Rect OriginThumbRect() const;
+ bool is_dirty() const { return !dirty_rect_.IsEmpty(); }
+
int MaxTextureSize();
float ClampScaleToMaxTextureSize(float scale);
- scoped_refptr<UIResourceBitmap> RasterizeTrack();
- scoped_refptr<UIResourceBitmap> RasterizeThumb();
-
scoped_ptr<Scrollbar> scrollbar_;
int thumb_thickness_;
int thumb_length_;
gfx::Rect track_rect_;
- gfx::Rect thumb_rect_;
int scroll_layer_id_;
- scoped_ptr<ScopedUIResource> track_resource_;
- scoped_ptr<ScopedUIResource> thumb_resource_;
+ unsigned texture_format_;
+ gfx::RectF dirty_rect_;
+
+ scoped_refptr<CachingBitmapContentLayerUpdater> track_updater_;
+ scoped_refptr<CachingBitmapContentLayerUpdater> thumb_updater_;
+
+ // All the parts of the scrollbar except the thumb
+ scoped_ptr<LayerUpdater::Resource> track_;
+ scoped_ptr<LayerUpdater::Resource> thumb_;
+
DISALLOW_COPY_AND_ASSIGN(ScrollbarLayer);
};
« no previous file with comments | « no previous file | cc/layers/scrollbar_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698