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

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: Fix license headers 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
« no previous file with comments | « cc/CCDirectRenderer.h ('k') | cc/CCLayerTreeHostImpl.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 texture->setIsComplete(!renderPass->hasOcclusionFromOutsideTargetSurface ()); 206 texture->setIsComplete(!renderPass->hasOcclusionFromOutsideTargetSurface ());
207 } 207 }
208 208
209 bool CCDirectRenderer::useRenderPass(DrawingFrame& frame, const CCRenderPass* re nderPass) 209 bool CCDirectRenderer::useRenderPass(DrawingFrame& frame, const CCRenderPass* re nderPass)
210 { 210 {
211 frame.currentRenderPass = renderPass; 211 frame.currentRenderPass = renderPass;
212 frame.currentTexture = 0; 212 frame.currentTexture = 0;
213 213
214 if (renderPass == frame.rootRenderPass) { 214 if (renderPass == frame.rootRenderPass) {
215 bindFramebufferToOutputSurface(frame); 215 bindFramebufferToOutputSurface(frame);
216 initializeMatrices(frame, renderPass->outputRect(), true); 216 initializeMatrices(frame, renderPass->outputRect(), flippedFramebuffer() );
217 setDrawViewportSize(renderPass->outputRect().size()); 217 setDrawViewportSize(renderPass->outputRect().size());
218 return true; 218 return true;
219 } 219 }
220 220
221 CachedTexture* texture = m_renderPassTextures.get(renderPass->id()); 221 CachedTexture* texture = m_renderPassTextures.get(renderPass->id());
222 ASSERT(texture); 222 ASSERT(texture);
223 if (!texture->id() && !texture->allocate(CCRenderer::ImplPool, renderPassTex tureSize(renderPass), renderPassTextureFormat(renderPass), CCResourceProvider::T extureUsageFramebuffer)) 223 if (!texture->id() && !texture->allocate(CCRenderer::ImplPool, renderPassTex tureSize(renderPass), renderPassTextureFormat(renderPass), CCResourceProvider::T extureUsageFramebuffer))
224 return false; 224 return false;
225 225
226 return bindFramebufferToTexture(frame, texture, renderPass->outputRect()); 226 return bindFramebufferToTexture(frame, texture, renderPass->outputRect());
(...skipping 11 matching lines...) Expand all
238 return pass->outputRect().size(); 238 return pass->outputRect().size();
239 } 239 }
240 240
241 // static 241 // static
242 GC3Denum CCDirectRenderer::renderPassTextureFormat(const CCRenderPass*) 242 GC3Denum CCDirectRenderer::renderPassTextureFormat(const CCRenderPass*)
243 { 243 {
244 return GraphicsContext3D::RGBA; 244 return GraphicsContext3D::RGBA;
245 } 245 }
246 246
247 } 247 }
OLDNEW
« no previous file with comments | « cc/CCDirectRenderer.h ('k') | cc/CCLayerTreeHostImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698