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

Side by Side Diff: cc/draw_quad.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 unified diff | Download patch
« no previous file with comments | « cc/direct_renderer.cc ('k') | cc/gl_renderer.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 "CCDrawQuad.h" 7 #include "CCDrawQuad.h"
8 8
9 #include "CCCheckerboardDrawQuad.h" 9 #include "CCCheckerboardDrawQuad.h"
10 #include "CCDebugBorderDrawQuad.h" 10 #include "CCDebugBorderDrawQuad.h"
(...skipping 25 matching lines...) Expand all
36 { 36 {
37 if (opacity() != 1) 37 if (opacity() != 1)
38 return gfx::Rect(); 38 return gfx::Rect();
39 if (m_sharedQuadState->opaque && m_quadOpaque) 39 if (m_sharedQuadState->opaque && m_quadOpaque)
40 return m_quadRect; 40 return m_quadRect;
41 return m_opaqueRect; 41 return m_opaqueRect;
42 } 42 }
43 43
44 void DrawQuad::setQuadVisibleRect(gfx::Rect quadVisibleRect) 44 void DrawQuad::setQuadVisibleRect(gfx::Rect quadVisibleRect)
45 { 45 {
46 m_quadVisibleRect = quadVisibleRect.Intersect(m_quadRect); 46 m_quadVisibleRect = quadVisibleRect;
47 m_quadVisibleRect.Intersect(m_quadRect);
47 } 48 }
48 49
49 unsigned DrawQuad::size() const 50 unsigned DrawQuad::size() const
50 { 51 {
51 switch (material()) { 52 switch (material()) {
52 case Checkerboard: 53 case Checkerboard:
53 return sizeof(CheckerboardDrawQuad); 54 return sizeof(CheckerboardDrawQuad);
54 case DebugBorder: 55 case DebugBorder:
55 return sizeof(DebugBorderDrawQuad); 56 return sizeof(DebugBorderDrawQuad);
56 case IOSurfaceContent: 57 case IOSurfaceContent:
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 return copyQuad.Pass(); 91 return copyQuad.Pass();
91 } 92 }
92 93
93 void DrawQuad::setSharedQuadState(const SharedQuadState* sharedQuadState) 94 void DrawQuad::setSharedQuadState(const SharedQuadState* sharedQuadState)
94 { 95 {
95 m_sharedQuadState = sharedQuadState; 96 m_sharedQuadState = sharedQuadState;
96 m_sharedQuadStateId = sharedQuadState->id; 97 m_sharedQuadStateId = sharedQuadState->id;
97 } 98 }
98 99
99 } 100 }
OLDNEW
« no previous file with comments | « cc/direct_renderer.cc ('k') | cc/gl_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698