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

Side by Side Diff: cc/CCDirectRenderer.cpp

Issue 10918258: Add CC software renderer. (Closed) Base URL: http://git.chromium.org/chromium/src.git@gladapter
Patch Set: Created 8 years, 3 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
OLDNEW
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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 {
176 frame.currentRenderPass = renderPass; 176 frame.currentRenderPass = renderPass;
177 frame.currentTexture = 0; 177 frame.currentTexture = 0;
178 178
179 if (renderPass == frame.rootRenderPass) { 179 if (renderPass == frame.rootRenderPass) {
180 bindFramebufferToOutputSurface(frame); 180 bindFramebufferToOutputSurface(frame);
181 initializeMatrices(frame, renderPass->outputRect(), true); 181 initializeMatrices(frame, renderPass->outputRect(), flippedFramebuffer() );
182 setDrawViewportSize(renderPass->outputRect().size()); 182 setDrawViewportSize(renderPass->outputRect().size());
183 return true; 183 return true;
184 } 184 }
185 185
186 CachedTexture* texture = m_renderPassTextures.get(renderPass->id()); 186 CachedTexture* texture = m_renderPassTextures.get(renderPass->id());
187 ASSERT(texture); 187 ASSERT(texture);
188 if (!texture->id() && !texture->allocate(CCRenderer::ImplPool, renderPassTex tureSize(renderPass), renderPassTextureFormat(renderPass), CCResourceProvider::T extureUsageFramebuffer)) 188 if (!texture->id() && !texture->allocate(CCRenderer::ImplPool, renderPassTex tureSize(renderPass), renderPassTextureFormat(renderPass), CCResourceProvider::T extureUsageFramebuffer))
189 return false; 189 return false;
190 190
191 return bindFramebufferToTexture(frame, texture, renderPass->outputRect()); 191 return bindFramebufferToTexture(frame, texture, renderPass->outputRect());
(...skipping 11 matching lines...) Expand all
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698