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

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: Rebase to fix collision with solid colour scrollbars patch. 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
« no previous file with comments | « cc/cc.gyp ('k') | cc/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 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 25 matching lines...) Expand all
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 bool OpacityIsAnimating() const;
103 virtual bool OpacityCanAnimateOnImplThread() const;
99 104
100 void SetFilters(const WebKit::WebFilterOperations& filters); 105 void SetFilters(const WebKit::WebFilterOperations& filters);
101 const WebKit::WebFilterOperations& filters() const { return filters_; } 106 const WebKit::WebFilterOperations& filters() const { return filters_; }
102 107
103 void SetFilter(const skia::RefPtr<SkImageFilter>& filter); 108 void SetFilter(const skia::RefPtr<SkImageFilter>& filter);
104 skia::RefPtr<SkImageFilter> filter() const { return filter_; } 109 skia::RefPtr<SkImageFilter> filter() const { return filter_; }
105 110
106 // Background filters are filters applied to what is behind this layer, when 111 // 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 112 // they are viewed through non-opaque regions in this layer. They are used
108 // through the WebLayer interface, and are not exposed to HTML. 113 // 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_; 479 WebKit::WebLayerScrollClient* layer_scroll_client_;
475 480
476 DrawProperties<Layer, RenderSurface> draw_properties_; 481 DrawProperties<Layer, RenderSurface> draw_properties_;
477 482
478 DISALLOW_COPY_AND_ASSIGN(Layer); 483 DISALLOW_COPY_AND_ASSIGN(Layer);
479 }; 484 };
480 485
481 } // namespace cc 486 } // namespace cc
482 487
483 #endif // CC_LAYER_H_ 488 #endif // CC_LAYER_H_
OLDNEW
« no previous file with comments | « cc/cc.gyp ('k') | cc/layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698