| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 "CCDirectRenderer.h" | 7 #include "CCDirectRenderer.h" |
| 8 | 8 |
| 9 #include "CCMathUtil.h" | 9 #include "CCMathUtil.h" |
| 10 #include <public/WebTransformationMatrix.h> | 10 #include <public/WebTransformationMatrix.h> |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 WebTransformationMatrix inverseTransformToRoot = frame.currentRenderPass
->transformToRootTarget().inverse(); | 152 WebTransformationMatrix inverseTransformToRoot = frame.currentRenderPass
->transformToRootTarget().inverse(); |
| 153 frame.scissorRectInRenderPassSpace.intersect(CCMathUtil::projectClippedR
ect(inverseTransformToRoot, frame.rootDamageRect)); | 153 frame.scissorRectInRenderPassSpace.intersect(CCMathUtil::projectClippedR
ect(inverseTransformToRoot, frame.rootDamageRect)); |
| 154 } | 154 } |
| 155 | 155 |
| 156 enableScissorTestRect(moveScissorToWindowSpace(frame, frame.scissorRectInRen
derPassSpace)); | 156 enableScissorTestRect(moveScissorToWindowSpace(frame, frame.scissorRectInRen
derPassSpace)); |
| 157 clearFramebuffer(frame); | 157 clearFramebuffer(frame); |
| 158 | 158 |
| 159 const CCQuadList& quadList = renderPass->quadList(); | 159 const CCQuadList& quadList = renderPass->quadList(); |
| 160 for (CCQuadList::constBackToFrontIterator it = quadList.backToFrontBegin();
it != quadList.backToFrontEnd(); ++it) { | 160 for (CCQuadList::constBackToFrontIterator it = quadList.backToFrontBegin();
it != quadList.backToFrontEnd(); ++it) { |
| 161 FloatRect quadScissorRect = frame.scissorRectInRenderPassSpace; | 161 FloatRect quadScissorRect = frame.scissorRectInRenderPassSpace; |
| 162 quadScissorRect.intersect(it->get()->clippedRectInTarget()); | 162 quadScissorRect.intersect((*it)->clippedRectInTarget()); |
| 163 if (!quadScissorRect.isEmpty()) { | 163 if (!quadScissorRect.isEmpty()) { |
| 164 enableScissorTestRect(moveScissorToWindowSpace(frame, quadScissorRec
t)); | 164 enableScissorTestRect(moveScissorToWindowSpace(frame, quadScissorRec
t)); |
| 165 drawQuad(frame, it->get()); | 165 drawQuad(frame, *it); |
| 166 } | 166 } |
| 167 } | 167 } |
| 168 | 168 |
| 169 CachedTexture* texture = m_renderPassTextures.get(renderPass->id()); | 169 CachedTexture* texture = m_renderPassTextures.get(renderPass->id()); |
| 170 if (texture) | 170 if (texture) |
| 171 texture->setIsComplete(!renderPass->hasOcclusionFromOutsideTargetSurface
()); | 171 texture->setIsComplete(!renderPass->hasOcclusionFromOutsideTargetSurface
()); |
| 172 } | 172 } |
| 173 | 173 |
| 174 bool CCDirectRenderer::useRenderPass(DrawingFrame& frame, const CCRenderPass* re
nderPass) | 174 bool CCDirectRenderer::useRenderPass(DrawingFrame& frame, const CCRenderPass* re
nderPass) |
| 175 { | 175 { |
| (...skipping 27 matching lines...) Expand all Loading... |
| 203 return pass->outputRect().size(); | 203 return pass->outputRect().size(); |
| 204 } | 204 } |
| 205 | 205 |
| 206 // static | 206 // static |
| 207 GC3Denum CCDirectRenderer::renderPassTextureFormat(const CCRenderPass*) | 207 GC3Denum CCDirectRenderer::renderPassTextureFormat(const CCRenderPass*) |
| 208 { | 208 { |
| 209 return GraphicsContext3D::RGBA; | 209 return GraphicsContext3D::RGBA; |
| 210 } | 210 } |
| 211 | 211 |
| 212 } | 212 } |
| OLD | NEW |