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

Side by Side Diff: cc/layer.cc

Issue 11365239: cc: Add support for debugging layer borders directly in the compositor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 1 month 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/layer.h ('k') | cc/layer_impl.h » ('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 #include "cc/layer.h" 5 #include "cc/layer.h"
6 6
7 #include "cc/active_animation.h" 7 #include "cc/active_animation.h"
8 #include "cc/animation_events.h" 8 #include "cc/animation_events.h"
9 #include "cc/layer_animation_controller.h" 9 #include "cc/layer_animation_controller.h"
10 #include "cc/layer_impl.h" 10 #include "cc/layer_impl.h"
(...skipping 23 matching lines...) Expand all
34 , m_parent(0) 34 , m_parent(0)
35 , m_layerTreeHost(0) 35 , m_layerTreeHost(0)
36 , m_layerAnimationController(LayerAnimationController::create(this)) 36 , m_layerAnimationController(LayerAnimationController::create(this))
37 , m_scrollable(false) 37 , m_scrollable(false)
38 , m_shouldScrollOnMainThread(false) 38 , m_shouldScrollOnMainThread(false)
39 , m_haveWheelEventHandlers(false) 39 , m_haveWheelEventHandlers(false)
40 , m_nonFastScrollableRegionChanged(false) 40 , m_nonFastScrollableRegionChanged(false)
41 , m_touchEventHandlerRegionChanged(false) 41 , m_touchEventHandlerRegionChanged(false)
42 , m_anchorPoint(0.5, 0.5) 42 , m_anchorPoint(0.5, 0.5)
43 , m_backgroundColor(0) 43 , m_backgroundColor(0)
44 , m_debugBorderColor(0)
45 , m_debugBorderWidth(0)
46 , m_opacity(1.0) 44 , m_opacity(1.0)
47 , m_filter(0) 45 , m_filter(0)
48 , m_anchorPointZ(0) 46 , m_anchorPointZ(0)
49 , m_isContainerForFixedPositionLayers(false) 47 , m_isContainerForFixedPositionLayers(false)
50 , m_fixedToContainerLayer(false) 48 , m_fixedToContainerLayer(false)
51 , m_isDrawable(false) 49 , m_isDrawable(false)
52 , m_masksToBounds(false) 50 , m_masksToBounds(false)
53 , m_contentsOpaque(false) 51 , m_contentsOpaque(false)
54 , m_doubleSided(true) 52 , m_doubleSided(true)
55 , m_useLCDText(false) 53 , m_useLCDText(false)
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 } 555 }
558 556
559 void Layer::pushPropertiesTo(LayerImpl* layer) 557 void Layer::pushPropertiesTo(LayerImpl* layer)
560 { 558 {
561 layer->setAnchorPoint(m_anchorPoint); 559 layer->setAnchorPoint(m_anchorPoint);
562 layer->setAnchorPointZ(m_anchorPointZ); 560 layer->setAnchorPointZ(m_anchorPointZ);
563 layer->setBackgroundColor(m_backgroundColor); 561 layer->setBackgroundColor(m_backgroundColor);
564 layer->setBounds(m_bounds); 562 layer->setBounds(m_bounds);
565 layer->setContentBounds(contentBounds()); 563 layer->setContentBounds(contentBounds());
566 layer->setContentsScale(contentsScaleX(), contentsScaleY()); 564 layer->setContentsScale(contentsScaleX(), contentsScaleY());
567 layer->setDebugBorderColor(m_debugBorderColor);
568 layer->setDebugBorderWidth(m_debugBorderWidth);
569 layer->setDebugName(m_debugName); 565 layer->setDebugName(m_debugName);
570 layer->setDoubleSided(m_doubleSided); 566 layer->setDoubleSided(m_doubleSided);
571 layer->setDrawCheckerboardForMissingTiles(m_drawCheckerboardForMissingTiles) ; 567 layer->setDrawCheckerboardForMissingTiles(m_drawCheckerboardForMissingTiles) ;
572 layer->setForceRenderSurface(m_forceRenderSurface); 568 layer->setForceRenderSurface(m_forceRenderSurface);
573 layer->setDrawsContent(drawsContent()); 569 layer->setDrawsContent(drawsContent());
574 layer->setFilters(filters()); 570 layer->setFilters(filters());
575 layer->setFilter(filter()); 571 layer->setFilter(filter());
576 layer->setBackgroundFilters(backgroundFilters()); 572 layer->setBackgroundFilters(backgroundFilters());
577 layer->setUseLCDText(m_useLCDText); 573 layer->setUseLCDText(m_useLCDText);
578 layer->setMasksToBounds(m_masksToBounds); 574 layer->setMasksToBounds(m_masksToBounds);
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
634 bool Layer::drawsContent() const 630 bool Layer::drawsContent() const
635 { 631 {
636 return m_isDrawable; 632 return m_isDrawable;
637 } 633 }
638 634
639 bool Layer::needMoreUpdates() 635 bool Layer::needMoreUpdates()
640 { 636 {
641 return false; 637 return false;
642 } 638 }
643 639
644 void Layer::setDebugBorderColor(SkColor color)
645 {
646 m_debugBorderColor = color;
647 setNeedsCommit();
648 }
649
650 void Layer::setDebugBorderWidth(float width)
651 {
652 m_debugBorderWidth = width;
653 setNeedsCommit();
654 }
655
656 void Layer::setDebugName(const std::string& debugName) 640 void Layer::setDebugName(const std::string& debugName)
657 { 641 {
658 m_debugName = debugName; 642 m_debugName = debugName;
659 setNeedsCommit(); 643 setNeedsCommit();
660 } 644 }
661 645
662 float Layer::contentsScaleX() const 646 float Layer::contentsScaleX() const
663 { 647 {
664 return 1.0; 648 return 1.0;
665 } 649 }
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
848 { 832 {
849 return 0; 833 return 0;
850 } 834 }
851 835
852 void sortLayers(std::vector<scoped_refptr<Layer> >::iterator, std::vector<scoped _refptr<Layer> >::iterator, void*) 836 void sortLayers(std::vector<scoped_refptr<Layer> >::iterator, std::vector<scoped _refptr<Layer> >::iterator, void*)
853 { 837 {
854 // Currently we don't use z-order to decide what to paint, so there's no nee d to actually sort Layers. 838 // Currently we don't use z-order to decide what to paint, so there's no nee d to actually sort Layers.
855 } 839 }
856 840
857 } // namespace cc 841 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layer.h ('k') | cc/layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698