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

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

Issue 18341009: Refactor cc scrollbar layers to separate solid-color vs desktop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address tfarina@'s comments. 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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_LAYER_IMPL_H_ 5 #ifndef CC_LAYERS_LAYER_IMPL_H_
6 #define CC_LAYERS_LAYER_IMPL_H_ 6 #define CC_LAYERS_LAYER_IMPL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 26 matching lines...) Expand all
37 class DictionaryValue; 37 class DictionaryValue;
38 } 38 }
39 39
40 namespace cc { 40 namespace cc {
41 41
42 class LayerTreeHostImpl; 42 class LayerTreeHostImpl;
43 class LayerTreeImpl; 43 class LayerTreeImpl;
44 class QuadSink; 44 class QuadSink;
45 class Renderer; 45 class Renderer;
46 class ScrollbarAnimationController; 46 class ScrollbarAnimationController;
47 class ScrollbarLayerImpl; 47 class ScrollbarLayerImplBase;
48 class Layer; 48 class Layer;
49 49
50 struct AppendQuadsData; 50 struct AppendQuadsData;
51 51
52 enum DrawMode { 52 enum DrawMode {
53 DRAW_MODE_NONE, 53 DRAW_MODE_NONE,
54 DRAW_MODE_HARDWARE, 54 DRAW_MODE_HARDWARE,
55 DRAW_MODE_SOFTWARE, 55 DRAW_MODE_SOFTWARE,
56 DRAW_MODE_RESOURCELESS_SOFTWARE 56 DRAW_MODE_RESOURCELESS_SOFTWARE
57 }; 57 };
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 121
122 virtual ResourceProvider::ResourceId ContentsResourceId() const; 122 virtual ResourceProvider::ResourceId ContentsResourceId() const;
123 123
124 virtual bool HasDelegatedContent() const; 124 virtual bool HasDelegatedContent() const;
125 virtual bool HasContributingDelegatedRenderPasses() const; 125 virtual bool HasContributingDelegatedRenderPasses() const;
126 virtual RenderPass::Id FirstContributingRenderPassId() const; 126 virtual RenderPass::Id FirstContributingRenderPassId() const;
127 virtual RenderPass::Id NextContributingRenderPassId(RenderPass::Id id) const; 127 virtual RenderPass::Id NextContributingRenderPassId(RenderPass::Id id) const;
128 128
129 virtual void UpdateTilePriorities() {} 129 virtual void UpdateTilePriorities() {}
130 130
131 virtual ScrollbarLayerImpl* ToScrollbarLayer(); 131 virtual ScrollbarLayerImplBase* ToScrollbarLayerBase();
132 132
133 // Returns true if this layer has content to draw. 133 // Returns true if this layer has content to draw.
134 void SetDrawsContent(bool draws_content); 134 void SetDrawsContent(bool draws_content);
135 bool DrawsContent() const { return draws_content_; } 135 bool DrawsContent() const { return draws_content_; }
136 136
137 void SetHideLayerAndSubtree(bool hide); 137 void SetHideLayerAndSubtree(bool hide);
138 bool hide_layer_and_subtree() const { return hide_layer_and_subtree_; } 138 bool hide_layer_and_subtree() const { return hide_layer_and_subtree_; }
139 139
140 bool force_render_surface() const { return force_render_surface_; } 140 bool force_render_surface() const { return force_render_surface_; }
141 void SetForceRenderSurface(bool force) { force_render_surface_ = force; } 141 void SetForceRenderSurface(bool force) { force_render_surface_ = force; }
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 // was lost and that a new one has been created. Won't be called 406 // was lost and that a new one has been created. Won't be called
407 // until the new surface has been created successfully. 407 // until the new surface has been created successfully.
408 virtual void DidLoseOutputSurface(); 408 virtual void DidLoseOutputSurface();
409 409
410 ScrollbarAnimationController* scrollbar_animation_controller() const { 410 ScrollbarAnimationController* scrollbar_animation_controller() const {
411 return scrollbar_animation_controller_.get(); 411 return scrollbar_animation_controller_.get();
412 } 412 }
413 413
414 void SetScrollbarOpacity(float opacity); 414 void SetScrollbarOpacity(float opacity);
415 415
416 void SetHorizontalScrollbarLayer(ScrollbarLayerImpl* scrollbar_layer); 416 void SetHorizontalScrollbarLayer(ScrollbarLayerImplBase* scrollbar_layer);
417 ScrollbarLayerImpl* horizontal_scrollbar_layer() { 417 ScrollbarLayerImplBase* horizontal_scrollbar_layer() {
418 return horizontal_scrollbar_layer_; 418 return horizontal_scrollbar_layer_;
419 } 419 }
420 420
421 void SetVerticalScrollbarLayer(ScrollbarLayerImpl* scrollbar_layer); 421 void SetVerticalScrollbarLayer(ScrollbarLayerImplBase* scrollbar_layer);
422 ScrollbarLayerImpl* vertical_scrollbar_layer() { 422 ScrollbarLayerImplBase* vertical_scrollbar_layer() {
423 return vertical_scrollbar_layer_; 423 return vertical_scrollbar_layer_;
424 } 424 }
425 425
426 gfx::Rect LayerRectToContentRect(const gfx::RectF& layer_rect) const; 426 gfx::Rect LayerRectToContentRect(const gfx::RectF& layer_rect) const;
427 427
428 virtual skia::RefPtr<SkPicture> GetPicture(); 428 virtual skia::RefPtr<SkPicture> GetPicture();
429 429
430 virtual bool CanClipSelf() const; 430 virtual bool CanClipSelf() const;
431 431
432 virtual bool AreVisibleResourcesReady() const; 432 virtual bool AreVisibleResourcesReady() const;
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 gfx::RectF update_rect_; 554 gfx::RectF update_rect_;
555 555
556 // Manages animations for this layer. 556 // Manages animations for this layer.
557 scoped_refptr<LayerAnimationController> layer_animation_controller_; 557 scoped_refptr<LayerAnimationController> layer_animation_controller_;
558 558
559 // Manages scrollbars for this layer 559 // Manages scrollbars for this layer
560 scoped_ptr<ScrollbarAnimationController> scrollbar_animation_controller_; 560 scoped_ptr<ScrollbarAnimationController> scrollbar_animation_controller_;
561 561
562 // Weak pointers to this layer's scrollbars, if it has them. Updated during 562 // Weak pointers to this layer's scrollbars, if it has them. Updated during
563 // tree synchronization. 563 // tree synchronization.
564 ScrollbarLayerImpl* horizontal_scrollbar_layer_; 564 ScrollbarLayerImplBase* horizontal_scrollbar_layer_;
565 ScrollbarLayerImpl* vertical_scrollbar_layer_; 565 ScrollbarLayerImplBase* vertical_scrollbar_layer_;
566 566
567 ScopedPtrVector<CopyOutputRequest> copy_requests_; 567 ScopedPtrVector<CopyOutputRequest> copy_requests_;
568 568
569 // Group of properties that need to be computed based on the layer tree 569 // Group of properties that need to be computed based on the layer tree
570 // hierarchy before layers can be drawn. 570 // hierarchy before layers can be drawn.
571 DrawProperties<LayerImpl, RenderSurfaceImpl> draw_properties_; 571 DrawProperties<LayerImpl, RenderSurfaceImpl> draw_properties_;
572 572
573 DISALLOW_COPY_AND_ASSIGN(LayerImpl); 573 DISALLOW_COPY_AND_ASSIGN(LayerImpl);
574 }; 574 };
575 575
576 } // namespace cc 576 } // namespace cc
577 577
578 #endif // CC_LAYERS_LAYER_IMPL_H_ 578 #endif // CC_LAYERS_LAYER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698