| OLD | NEW |
| 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 #if USE(ACCELERATED_COMPOSITING) | 7 #if USE(ACCELERATED_COMPOSITING) |
| 8 #include "LayerChromium.h" | 8 #include "LayerChromium.h" |
| 9 | 9 |
| 10 #include "CCActiveAnimation.h" | 10 #include "CCActiveAnimation.h" |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 , m_useParentBackfaceVisibility(false) | 59 , m_useParentBackfaceVisibility(false) |
| 60 , m_drawCheckerboardForMissingTiles(false) | 60 , m_drawCheckerboardForMissingTiles(false) |
| 61 , m_forceRenderSurface(false) | 61 , m_forceRenderSurface(false) |
| 62 , m_replicaLayer(0) | 62 , m_replicaLayer(0) |
| 63 , m_drawOpacity(0) | 63 , m_drawOpacity(0) |
| 64 , m_drawOpacityIsAnimating(false) | 64 , m_drawOpacityIsAnimating(false) |
| 65 , m_renderTarget(0) | 65 , m_renderTarget(0) |
| 66 , m_drawTransformIsAnimating(false) | 66 , m_drawTransformIsAnimating(false) |
| 67 , m_screenSpaceTransformIsAnimating(false) | 67 , m_screenSpaceTransformIsAnimating(false) |
| 68 , m_contentsScale(1.0) | 68 , m_contentsScale(1.0) |
| 69 , m_boundsContainPageScale(false) |
| 69 , m_layerAnimationDelegate(0) | 70 , m_layerAnimationDelegate(0) |
| 70 , m_layerScrollClient(0) | 71 , m_layerScrollClient(0) |
| 71 { | 72 { |
| 72 if (m_layerId < 0) { | 73 if (m_layerId < 0) { |
| 73 s_nextLayerId = 1; | 74 s_nextLayerId = 1; |
| 74 m_layerId = s_nextLayerId++; | 75 m_layerId = s_nextLayerId++; |
| 75 } | 76 } |
| 76 } | 77 } |
| 77 | 78 |
| 78 LayerChromium::~LayerChromium() | 79 LayerChromium::~LayerChromium() |
| (...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 584 { | 585 { |
| 585 m_debugName = debugName; | 586 m_debugName = debugName; |
| 586 setNeedsCommit(); | 587 setNeedsCommit(); |
| 587 } | 588 } |
| 588 | 589 |
| 589 void LayerChromium::setContentsScale(float contentsScale) | 590 void LayerChromium::setContentsScale(float contentsScale) |
| 590 { | 591 { |
| 591 if (!needsContentsScale() || m_contentsScale == contentsScale) | 592 if (!needsContentsScale() || m_contentsScale == contentsScale) |
| 592 return; | 593 return; |
| 593 m_contentsScale = contentsScale; | 594 m_contentsScale = contentsScale; |
| 595 |
| 594 setNeedsDisplay(); | 596 setNeedsDisplay(); |
| 595 } | 597 } |
| 596 | 598 |
| 599 void LayerChromium::setBoundsContainPageScale(bool boundsContainPageScale) |
| 600 { |
| 601 if (boundsContainPageScale == m_boundsContainPageScale) |
| 602 return; |
| 603 |
| 604 m_boundsContainPageScale = boundsContainPageScale; |
| 605 setNeedsDisplay(); |
| 606 } |
| 607 |
| 597 void LayerChromium::createRenderSurface() | 608 void LayerChromium::createRenderSurface() |
| 598 { | 609 { |
| 599 ASSERT(!m_renderSurface); | 610 ASSERT(!m_renderSurface); |
| 600 m_renderSurface = adoptPtr(new RenderSurfaceChromium(this)); | 611 m_renderSurface = adoptPtr(new RenderSurfaceChromium(this)); |
| 601 setRenderTarget(this); | 612 setRenderTarget(this); |
| 602 } | 613 } |
| 603 | 614 |
| 604 bool LayerChromium::descendantDrawsContent() | 615 bool LayerChromium::descendantDrawsContent() |
| 605 { | 616 { |
| 606 for (size_t i = 0; i < m_children.size(); ++i) { | 617 for (size_t i = 0; i < m_children.size(); ++i) { |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 705 return Region(); | 716 return Region(); |
| 706 } | 717 } |
| 707 | 718 |
| 708 void sortLayers(Vector<RefPtr<LayerChromium> >::iterator, Vector<RefPtr<LayerChr
omium> >::iterator, void*) | 719 void sortLayers(Vector<RefPtr<LayerChromium> >::iterator, Vector<RefPtr<LayerChr
omium> >::iterator, void*) |
| 709 { | 720 { |
| 710 // Currently we don't use z-order to decide what to paint, so there's no nee
d to actually sort LayerChromiums. | 721 // Currently we don't use z-order to decide what to paint, so there's no nee
d to actually sort LayerChromiums. |
| 711 } | 722 } |
| 712 | 723 |
| 713 } | 724 } |
| 714 #endif // USE(ACCELERATED_COMPOSITING) | 725 #endif // USE(ACCELERATED_COMPOSITING) |
| OLD | NEW |