| 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 "cc/quads/draw_quad.h" |    5 #include "cc/quads/draw_quad.h" | 
|    6  |    6  | 
|    7 #include "base/logging.h" |    7 #include "base/logging.h" | 
|    8 #include "base/values.h" |    8 #include "base/values.h" | 
|    9 #include "cc/base/math_util.h" |    9 #include "cc/base/math_util.h" | 
|   10 #include "cc/debug/traced_value.h" |   10 #include "cc/debug/traced_value.h" | 
| (...skipping 18 matching lines...) Expand all  Loading... | 
|   29 namespace cc { |   29 namespace cc { | 
|   30  |   30  | 
|   31 DrawQuad::DrawQuad() |   31 DrawQuad::DrawQuad() | 
|   32     : material(INVALID), |   32     : material(INVALID), | 
|   33       needs_blending(false), |   33       needs_blending(false), | 
|   34       shared_quad_state() { |   34       shared_quad_state() { | 
|   35 } |   35 } | 
|   36  |   36  | 
|   37 void DrawQuad::SetAll(const SharedQuadState* shared_quad_state, |   37 void DrawQuad::SetAll(const SharedQuadState* shared_quad_state, | 
|   38                       Material material, |   38                       Material material, | 
|   39                       gfx::Rect rect, |   39                       const gfx::Rect& rect, | 
|   40                       gfx::Rect opaque_rect, |   40                       const gfx::Rect& opaque_rect, | 
|   41                       gfx::Rect visible_rect, |   41                       const gfx::Rect& visible_rect, | 
|   42                       bool needs_blending) { |   42                       bool needs_blending) { | 
|   43   DCHECK(rect.Contains(visible_rect)) << "rect: " << rect.ToString() |   43   DCHECK(rect.Contains(visible_rect)) << "rect: " << rect.ToString() | 
|   44                                       << " visible_rect: " |   44                                       << " visible_rect: " | 
|   45                                       << visible_rect.ToString(); |   45                                       << visible_rect.ToString(); | 
|   46   DCHECK(opaque_rect.IsEmpty() || rect.Contains(opaque_rect)) |   46   DCHECK(opaque_rect.IsEmpty() || rect.Contains(opaque_rect)) | 
|   47       << "rect: " << rect.ToString() << "opaque_rect " |   47       << "rect: " << rect.ToString() << "opaque_rect " | 
|   48       << opaque_rect.ToString(); |   48       << opaque_rect.ToString(); | 
|   49  |   49  | 
|   50   this->material = material; |   50   this->material = material; | 
|   51   this->rect = rect; |   51   this->rect = rect; | 
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  139              MathUtil::AsValue(visible_rect_as_target_space_quad).release()); |  139              MathUtil::AsValue(visible_rect_as_target_space_quad).release()); | 
|  140   value->SetBoolean("visible_rect_is_clipped", visible_rect_is_clipped); |  140   value->SetBoolean("visible_rect_is_clipped", visible_rect_is_clipped); | 
|  141  |  141  | 
|  142   value->SetBoolean("needs_blending", needs_blending); |  142   value->SetBoolean("needs_blending", needs_blending); | 
|  143   value->SetBoolean("should_draw_with_blending", ShouldDrawWithBlending()); |  143   value->SetBoolean("should_draw_with_blending", ShouldDrawWithBlending()); | 
|  144   ExtendValue(value.get()); |  144   ExtendValue(value.get()); | 
|  145   return value.PassAs<base::Value>(); |  145   return value.PassAs<base::Value>(); | 
|  146 } |  146 } | 
|  147  |  147  | 
|  148 }  // namespace cc |  148 }  // namespace cc | 
| OLD | NEW |