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

Side by Side Diff: cc/layer.cc

Issue 10690168: Aura: Resize locks with --ui-enable-threaded-compositing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moved needing to kick a frame logic up to RWHVA from Compositor. Created 8 years, 2 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 #include "config.h" 5 #include "config.h"
6 6
7 #include "LayerChromium.h" 7 #include "LayerChromium.h"
8 8
9 #include "CCActiveAnimation.h" 9 #include "CCActiveAnimation.h"
10 #include "CCAnimationEvents.h" 10 #include "CCAnimationEvents.h"
11 #include "CCLayerAnimationController.h" 11 #include "CCLayerAnimationController.h"
12 #include "CCLayerImpl.h" 12 #include "CCLayerImpl.h"
13 #include "CCLayerTreeHost.h" 13 #include "CCLayerTreeHost.h"
14 #include "CCSettings.h" 14 #include "CCSettings.h"
15 #include "TraceEvent.h"
15 #include <public/WebAnimationDelegate.h> 16 #include <public/WebAnimationDelegate.h>
16 #include <public/WebLayerScrollClient.h> 17 #include <public/WebLayerScrollClient.h>
17 #include <public/WebSize.h> 18 #include <public/WebSize.h>
18 19
19 using namespace std; 20 using namespace std;
20 using WebKit::WebTransformationMatrix; 21 using WebKit::WebTransformationMatrix;
21 22
22 namespace cc { 23 namespace cc {
23 24
24 static int s_nextLayerId = 1; 25 static int s_nextLayerId = 1;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 , m_replicaLayer(0) 60 , m_replicaLayer(0)
60 , m_drawOpacity(0) 61 , m_drawOpacity(0)
61 , m_drawOpacityIsAnimating(false) 62 , m_drawOpacityIsAnimating(false)
62 , m_renderTarget(0) 63 , m_renderTarget(0)
63 , m_drawTransformIsAnimating(false) 64 , m_drawTransformIsAnimating(false)
64 , m_screenSpaceTransformIsAnimating(false) 65 , m_screenSpaceTransformIsAnimating(false)
65 , m_contentsScale(1.0) 66 , m_contentsScale(1.0)
66 , m_boundsContainPageScale(false) 67 , m_boundsContainPageScale(false)
67 , m_layerAnimationDelegate(0) 68 , m_layerAnimationDelegate(0)
68 , m_layerScrollClient(0) 69 , m_layerScrollClient(0)
70 , m_deferUpdates(false)
69 { 71 {
70 if (m_layerId < 0) { 72 if (m_layerId < 0) {
71 s_nextLayerId = 1; 73 s_nextLayerId = 1;
72 m_layerId = s_nextLayerId++; 74 m_layerId = s_nextLayerId++;
73 } 75 }
74 } 76 }
75 77
76 LayerChromium::~LayerChromium() 78 LayerChromium::~LayerChromium()
77 { 79 {
78 // Our parent should be holding a reference to us so there should be no 80 // Our parent should be holding a reference to us so there should be no
(...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after
777 m_layerAnimationDelegate->notifyAnimationFinished(wallClockTime); 779 m_layerAnimationDelegate->notifyAnimationFinished(wallClockTime);
778 } 780 }
779 781
780 Region LayerChromium::visibleContentOpaqueRegion() const 782 Region LayerChromium::visibleContentOpaqueRegion() const
781 { 783 {
782 if (contentsOpaque()) 784 if (contentsOpaque())
783 return visibleContentRect(); 785 return visibleContentRect();
784 return Region(); 786 return Region();
785 } 787 }
786 788
789 void LayerChromium::setDeferUpdates(bool deferUpdates)
790 {
791 if (m_deferUpdates == deferUpdates)
792 return;
793 m_deferUpdates = deferUpdates;
794
795 if (deferUpdates)
796 TRACE_EVENT_ASYNC_BEGIN0("cc", "LayerChromium::setDeferUpdates", this);
797 else {
798 TRACE_EVENT_ASYNC_END0("cc", "LayerChromium::setDeferUpdates", this);
799 setNeedsCommit();
800 }
801 }
802
803 bool LayerChromium::deferUpdates()
804 {
805 return m_deferUpdates;
806 }
807
787 ScrollbarLayerChromium* LayerChromium::toScrollbarLayerChromium() 808 ScrollbarLayerChromium* LayerChromium::toScrollbarLayerChromium()
788 { 809 {
789 return 0; 810 return 0;
790 } 811 }
791 812
792 void sortLayers(std::vector<scoped_refptr<LayerChromium> >::iterator, std::vecto r<scoped_refptr<LayerChromium> >::iterator, void*) 813 void sortLayers(std::vector<scoped_refptr<LayerChromium> >::iterator, std::vecto r<scoped_refptr<LayerChromium> >::iterator, void*)
793 { 814 {
794 // Currently we don't use z-order to decide what to paint, so there's no nee d to actually sort LayerChromiums. 815 // Currently we don't use z-order to decide what to paint, so there's no nee d to actually sort LayerChromiums.
795 } 816 }
796 817
797 } 818 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698