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

Side by Side Diff: cc/layer.h

Issue 11550035: Implement pinch-zoom scaling for main-frame scrollbars and pinch-zoom overlay scrollbars. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make OpacityIsAnimating() virtual. Created 7 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2010 The Chromium Authors. All rights reserved. 1 // Copyright 2010 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 CC_LAYER_H_ 5 #ifndef CC_LAYER_H_
6 #define CC_LAYER_H_ 6 #define CC_LAYER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 class ScrollbarLayer; 44 class ScrollbarLayer;
45 struct AnimationEvent; 45 struct AnimationEvent;
46 struct RenderingStats; 46 struct RenderingStats;
47 47
48 // Base class for composited layers. Special layer types are derived from 48 // Base class for composited layers. Special layer types are derived from
49 // this class. 49 // this class.
50 class CC_EXPORT Layer : public base::RefCounted<Layer>, 50 class CC_EXPORT Layer : public base::RefCounted<Layer>,
51 public LayerAnimationValueObserver { 51 public LayerAnimationValueObserver {
52 public: 52 public:
53 typedef std::vector<scoped_refptr<Layer> > LayerList; 53 typedef std::vector<scoped_refptr<Layer> > LayerList;
54 enum LayerIdLabels {
55 PINCH_ZOOM_ROOT_SCROLL_LAYER_ID = -2,
56 INVALID_ID = -1,
57 };
54 58
55 static scoped_refptr<Layer> Create(); 59 static scoped_refptr<Layer> Create();
56 60
57 int id() const { return layer_id_; } 61 int id() const { return layer_id_; }
58 62
59 Layer* RootLayer(); 63 Layer* RootLayer();
60 Layer* parent() { return parent_; } 64 Layer* parent() { return parent_; }
61 const Layer* parent() const { return parent_; } 65 const Layer* parent() const { return parent_; }
62 void AddChild(scoped_refptr<Layer> child); 66 void AddChild(scoped_refptr<Layer> child);
63 void InsertChild(scoped_refptr<Layer> child, size_t index); 67 void InsertChild(scoped_refptr<Layer> child, size_t index);
(...skipping 24 matching lines...) Expand all
88 92
89 void SetMaskLayer(Layer* mask_layer); 93 void SetMaskLayer(Layer* mask_layer);
90 Layer* mask_layer() { return mask_layer_.get(); } 94 Layer* mask_layer() { return mask_layer_.get(); }
91 const Layer* mask_layer() const { return mask_layer_.get(); } 95 const Layer* mask_layer() const { return mask_layer_.get(); }
92 96
93 virtual void SetNeedsDisplayRect(const gfx::RectF& dirty_rect); 97 virtual void SetNeedsDisplayRect(const gfx::RectF& dirty_rect);
94 void SetNeedsDisplay() { SetNeedsDisplayRect(gfx::RectF(bounds())); } 98 void SetNeedsDisplay() { SetNeedsDisplayRect(gfx::RectF(bounds())); }
95 99
96 void SetOpacity(float opacity); 100 void SetOpacity(float opacity);
97 float opacity() const { return opacity_; } 101 float opacity() const { return opacity_; }
98 bool OpacityIsAnimating() const; 102 virtual bool OpacityIsAnimating() const;
99 103
100 void SetFilters(const WebKit::WebFilterOperations& filters); 104 void SetFilters(const WebKit::WebFilterOperations& filters);
101 const WebKit::WebFilterOperations& filters() const { return filters_; } 105 const WebKit::WebFilterOperations& filters() const { return filters_; }
102 106
103 void SetFilter(const skia::RefPtr<SkImageFilter>& filter); 107 void SetFilter(const skia::RefPtr<SkImageFilter>& filter);
104 skia::RefPtr<SkImageFilter> filter() const { return filter_; } 108 skia::RefPtr<SkImageFilter> filter() const { return filter_; }
105 109
106 // Background filters are filters applied to what is behind this layer, when 110 // Background filters are filters applied to what is behind this layer, when
107 // they are viewed through non-opaque regions in this layer. They are used 111 // they are viewed through non-opaque regions in this layer. They are used
108 // through the WebLayer interface, and are not exposed to HTML. 112 // through the WebLayer interface, and are not exposed to HTML.
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 WebKit::WebLayerScrollClient* layer_scroll_client_; 478 WebKit::WebLayerScrollClient* layer_scroll_client_;
475 479
476 DrawProperties<Layer, RenderSurface> draw_properties_; 480 DrawProperties<Layer, RenderSurface> draw_properties_;
477 481
478 DISALLOW_COPY_AND_ASSIGN(Layer); 482 DISALLOW_COPY_AND_ASSIGN(Layer);
479 }; 483 };
480 484
481 } // namespace cc 485 } // namespace cc
482 486
483 #endif // CC_LAYER_H_ 487 #endif // CC_LAYER_H_
OLDNEW
« no previous file with comments | « cc/cc.gyp ('k') | cc/layer_tree_host.h » ('j') | cc/scrollbar_layer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698