OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |