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

Side by Side Diff: cc/layers/scrollbar_layer_impl.h

Issue 16211002: Skip drawing unsupported layers in forced software mode (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address nits Created 7 years, 6 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 CC_LAYERS_SCROLLBAR_LAYER_IMPL_H_ 5 #ifndef CC_LAYERS_SCROLLBAR_LAYER_IMPL_H_
6 #define CC_LAYERS_SCROLLBAR_LAYER_IMPL_H_ 6 #define CC_LAYERS_SCROLLBAR_LAYER_IMPL_H_
7 7
8 #include "cc/base/cc_export.h" 8 #include "cc/base/cc_export.h"
9 #include "cc/input/scrollbar.h" 9 #include "cc/input/scrollbar.h"
10 #include "cc/layers/layer_impl.h" 10 #include "cc/layers/layer_impl.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 } 63 }
64 void set_visible_to_total_length_ratio(float ratio) { 64 void set_visible_to_total_length_ratio(float ratio) {
65 visible_to_total_length_ratio_ = ratio; 65 visible_to_total_length_ratio_ = ratio;
66 } 66 }
67 67
68 void SetCurrentPos(float current_pos) { current_pos_ = current_pos; } 68 void SetCurrentPos(float current_pos) { current_pos_ = current_pos; }
69 void SetMaximum(int maximum) { maximum_ = maximum; } 69 void SetMaximum(int maximum) { maximum_ = maximum; }
70 70
71 gfx::Rect ComputeThumbQuadRect() const; 71 gfx::Rect ComputeThumbQuadRect() const;
72 72
73 virtual bool CanDrawInTilelessSoftwareMode() const OVERRIDE;
74
73 protected: 75 protected:
74 ScrollbarLayerImpl(LayerTreeImpl* tree_impl, 76 ScrollbarLayerImpl(LayerTreeImpl* tree_impl,
75 int id, 77 int id,
76 ScrollbarOrientation orientation); 78 ScrollbarOrientation orientation);
77 79
78 private: 80 private:
79 virtual const char* LayerTypeAsString() const OVERRIDE; 81 virtual const char* LayerTypeAsString() const OVERRIDE;
80 82
81 gfx::Rect ScrollbarLayerRectToContentRect(gfx::RectF layer_rect) const; 83 gfx::Rect ScrollbarLayerRectToContentRect(gfx::RectF layer_rect) const;
82 84
(...skipping 20 matching lines...) Expand all
103 bool is_scroll_view_scrollbar_; 105 bool is_scroll_view_scrollbar_;
104 bool enabled_; 106 bool enabled_;
105 bool is_custom_scrollbar_; 107 bool is_custom_scrollbar_;
106 bool is_overlay_scrollbar_; 108 bool is_overlay_scrollbar_;
107 109
108 DISALLOW_COPY_AND_ASSIGN(ScrollbarLayerImpl); 110 DISALLOW_COPY_AND_ASSIGN(ScrollbarLayerImpl);
109 }; 111 };
110 112
111 } // namespace cc 113 } // namespace cc
112 #endif // CC_LAYERS_SCROLLBAR_LAYER_IMPL_H_ 114 #endif // CC_LAYERS_SCROLLBAR_LAYER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698