OLD | NEW |
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 #include "config.h" | 5 #include "config.h" |
6 | 6 |
7 #include "CCRenderPass.h" | 7 #include "CCRenderPass.h" |
8 | 8 |
9 #include "CCLayerImpl.h" | 9 #include "CCLayerImpl.h" |
10 #include "CCMathUtil.h" | 10 #include "CCMathUtil.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 : m_id(id) | 26 : m_id(id) |
27 , m_transformToRootTarget(transformToRootTarget) | 27 , m_transformToRootTarget(transformToRootTarget) |
28 , m_outputRect(outputRect) | 28 , m_outputRect(outputRect) |
29 , m_hasTransparentBackground(true) | 29 , m_hasTransparentBackground(true) |
30 , m_hasOcclusionFromOutsideTargetSurface(false) | 30 , m_hasOcclusionFromOutsideTargetSurface(false) |
31 { | 31 { |
32 ASSERT(id.layerId > 0); | 32 ASSERT(id.layerId > 0); |
33 ASSERT(id.index >= 0); | 33 ASSERT(id.index >= 0); |
34 } | 34 } |
35 | 35 |
| 36 CCRenderPass::~CCRenderPass() |
| 37 { |
| 38 } |
| 39 |
36 PassOwnPtr<CCRenderPass> CCRenderPass::copy(Id newId) const | 40 PassOwnPtr<CCRenderPass> CCRenderPass::copy(Id newId) const |
37 { | 41 { |
38 ASSERT(newId != m_id); | 42 ASSERT(newId != m_id); |
39 | 43 |
40 OwnPtr<CCRenderPass> copyPass(create(newId, m_outputRect, m_transformToRootT
arget)); | 44 OwnPtr<CCRenderPass> copyPass(create(newId, m_outputRect, m_transformToRootT
arget)); |
41 copyPass->setDamageRect(m_damageRect); | 45 copyPass->setDamageRect(m_damageRect); |
42 copyPass->setHasTransparentBackground(m_hasTransparentBackground); | 46 copyPass->setHasTransparentBackground(m_hasTransparentBackground); |
43 copyPass->setHasOcclusionFromOutsideTargetSurface(m_hasOcclusionFromOutsideT
argetSurface); | 47 copyPass->setHasOcclusionFromOutsideTargetSurface(m_hasOcclusionFromOutsideT
argetSurface); |
44 copyPass->setFilters(m_filters); | 48 copyPass->setFilters(m_filters); |
45 copyPass->setBackgroundFilters(m_backgroundFilters); | 49 copyPass->setBackgroundFilters(m_backgroundFilters); |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 Vector<WebCore::IntRect> fillRects = fillRegion.rects(); | 97 Vector<WebCore::IntRect> fillRects = fillRegion.rects(); |
94 for (size_t i = 0; i < fillRects.size(); ++i) { | 98 for (size_t i = 0; i < fillRects.size(); ++i) { |
95 // The root layer transform is composed of translations and scales only,
no perspective, so mapping is sufficient. | 99 // The root layer transform is composed of translations and scales only,
no perspective, so mapping is sufficient. |
96 IntRect layerRect = CCMathUtil::mapClippedRect(transformToLayerSpace, cc
::IntRect(fillRects[i])); | 100 IntRect layerRect = CCMathUtil::mapClippedRect(transformToLayerSpace, cc
::IntRect(fillRects[i])); |
97 // Skip the quad culler and just append the quads directly to avoid occl
usion checks. | 101 // Skip the quad culler and just append the quads directly to avoid occl
usion checks. |
98 m_quadList.append(CCSolidColorDrawQuad::create(sharedQuadState, layerRec
t, screenBackgroundColor)); | 102 m_quadList.append(CCSolidColorDrawQuad::create(sharedQuadState, layerRec
t, screenBackgroundColor)); |
99 } | 103 } |
100 } | 104 } |
101 | 105 |
102 } | 106 } |
OLD | NEW |