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

Unified Diff: cc/gl_renderer.cc

Issue 11110004: Make gfx::Rect class operations consistently mutate the class they are called on. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: cc/ fixes Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/draw_quad.cc ('k') | cc/software_renderer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/gl_renderer.cc
diff --git a/cc/gl_renderer.cc b/cc/gl_renderer.cc
index da543de67b62a7fac4c911a1bfc6674ed357d46b..677e196273b3e66bf0c6edc9a1bd00c135b01388 100644
--- a/cc/gl_renderer.cc
+++ b/cc/gl_renderer.cc
@@ -383,7 +383,7 @@ scoped_ptr<ScopedTexture> GLRenderer::drawBackgroundFilters(DrawingFrame& frame,
filters.getOutsets(top, right, bottom, left);
deviceRect.Inset(-left, -top, -right, -bottom);
- deviceRect = deviceRect.Intersect(frame.currentRenderPass->outputRect());
+ deviceRect.Intersect(frame.currentRenderPass->outputRect());
scoped_ptr<ScopedTexture> deviceBackgroundTexture = ScopedTexture::create(m_resourceProvider);
if (!getFramebufferTexture(deviceBackgroundTexture.get(), cc::IntRect(deviceRect)))
@@ -938,7 +938,7 @@ void GLRenderer::drawIOSurfaceQuad(const DrawingFrame& frame, const IOSurfaceDra
void GLRenderer::finishDrawingFrame(DrawingFrame& frame)
{
m_currentFramebufferLock.reset();
- m_swapBufferRect = m_swapBufferRect.Union(gfx::ToEnclosingRect(frame.rootDamageRect));
+ m_swapBufferRect.Union(gfx::ToEnclosingRect(frame.rootDamageRect));
GLC(m_context, m_context->disable(GL_SCISSOR_TEST));
GLC(m_context, m_context->disable(GL_BLEND));
@@ -1036,7 +1036,7 @@ bool GLRenderer::swapBuffers()
if (m_capabilities.usingPartialSwap) {
// If supported, we can save significant bandwidth by only swapping the damaged/scissored region (clamped to the viewport)
- m_swapBufferRect = m_swapBufferRect.Intersect(gfx::Rect(gfx::Point(), viewportSize()));
+ m_swapBufferRect.Intersect(gfx::Rect(gfx::Point(), viewportSize()));
int flippedYPosOfRectBottom = viewportHeight() - m_swapBufferRect.y() - m_swapBufferRect.height();
m_context->postSubBufferCHROMIUM(m_swapBufferRect.x(), flippedYPosOfRectBottom, m_swapBufferRect.width(), m_swapBufferRect.height());
} else {
« no previous file with comments | « cc/draw_quad.cc ('k') | cc/software_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698