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

Side by Side Diff: cc/direct_renderer.cc

Issue 11270042: Add non-member non-mutating methods for common gfx::Rect operations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 8 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « cc/delegated_renderer_layer_impl.cc ('k') | cc/draw_quad.cc » ('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 "cc/direct_renderer.h" 7 #include "cc/direct_renderer.h"
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 WebTransformationMatrix inverseTransformToRoot = frame.currentRenderPass ->transformToRootTarget().inverse(); 179 WebTransformationMatrix inverseTransformToRoot = frame.currentRenderPass ->transformToRootTarget().inverse();
180 gfx::RectF damageRectInRenderPassSpace = MathUtil::projectClippedRect(in verseTransformToRoot, cc::FloatRect(frame.rootDamageRect)); 180 gfx::RectF damageRectInRenderPassSpace = MathUtil::projectClippedRect(in verseTransformToRoot, cc::FloatRect(frame.rootDamageRect));
181 frame.scissorRectInRenderPassSpace.Intersect(damageRectInRenderPassSpace ); 181 frame.scissorRectInRenderPassSpace.Intersect(damageRectInRenderPassSpace );
182 } 182 }
183 183
184 enableScissorTestRect(moveScissorToWindowSpace(frame, frame.scissorRectInRen derPassSpace)); 184 enableScissorTestRect(moveScissorToWindowSpace(frame, frame.scissorRectInRen derPassSpace));
185 clearFramebuffer(frame); 185 clearFramebuffer(frame);
186 186
187 const QuadList& quadList = renderPass->quadList(); 187 const QuadList& quadList = renderPass->quadList();
188 for (QuadList::constBackToFrontIterator it = quadList.backToFrontBegin(); it != quadList.backToFrontEnd(); ++it) { 188 for (QuadList::constBackToFrontIterator it = quadList.backToFrontBegin(); it != quadList.backToFrontEnd(); ++it) {
189 gfx::RectF quadScissorRect = frame.scissorRectInRenderPassSpace; 189 gfx::RectF quadScissorRect = gfx::IntersectRects(frame.scissorRectInRend erPassSpace, (*it)->clippedRectInTarget());
190 quadScissorRect.Intersect((*it)->clippedRectInTarget());
191 if (!quadScissorRect.IsEmpty()) { 190 if (!quadScissorRect.IsEmpty()) {
192 enableScissorTestRect(moveScissorToWindowSpace(frame, quadScissorRec t)); 191 enableScissorTestRect(moveScissorToWindowSpace(frame, quadScissorRec t));
193 drawQuad(frame, *it); 192 drawQuad(frame, *it);
194 } 193 }
195 } 194 }
196 195
197 CachedTexture* texture = m_renderPassTextures.get(renderPass->id()); 196 CachedTexture* texture = m_renderPassTextures.get(renderPass->id());
198 if (texture) 197 if (texture)
199 texture->setIsComplete(!renderPass->hasOcclusionFromOutsideTargetSurface ()); 198 texture->setIsComplete(!renderPass->hasOcclusionFromOutsideTargetSurface ());
200 } 199 }
(...skipping 30 matching lines...) Expand all
231 return cc::IntSize(pass->outputRect().size()); 230 return cc::IntSize(pass->outputRect().size());
232 } 231 }
233 232
234 // static 233 // static
235 GLenum DirectRenderer::renderPassTextureFormat(const RenderPass*) 234 GLenum DirectRenderer::renderPassTextureFormat(const RenderPass*)
236 { 235 {
237 return GL_RGBA; 236 return GL_RGBA;
238 } 237 }
239 238
240 } 239 }
OLDNEW
« no previous file with comments | « cc/delegated_renderer_layer_impl.cc ('k') | cc/draw_quad.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698