| 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/trace_event/trace_event_argument.h" | 8 #include "base/trace_event/trace_event_argument.h" |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 #include "cc/base/math_util.h" | 10 #include "cc/base/math_util.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 this->needs_blending = needs_blending; | 50 this->needs_blending = needs_blending; |
| 51 this->shared_quad_state = shared_quad_state; | 51 this->shared_quad_state = shared_quad_state; |
| 52 | 52 |
| 53 DCHECK(shared_quad_state); | 53 DCHECK(shared_quad_state); |
| 54 DCHECK(material != INVALID); | 54 DCHECK(material != INVALID); |
| 55 } | 55 } |
| 56 | 56 |
| 57 DrawQuad::~DrawQuad() { | 57 DrawQuad::~DrawQuad() { |
| 58 } | 58 } |
| 59 | 59 |
| 60 void DrawQuad::AsValueInto(base::debug::TracedValue* value) const { | 60 void DrawQuad::AsValueInto(base::trace_event::TracedValue* value) const { |
| 61 value->SetInteger("material", material); | 61 value->SetInteger("material", material); |
| 62 TracedValue::SetIDRef(shared_quad_state, value, "shared_state"); | 62 TracedValue::SetIDRef(shared_quad_state, value, "shared_state"); |
| 63 | 63 |
| 64 MathUtil::AddToTracedValue("content_space_rect", rect, value); | 64 MathUtil::AddToTracedValue("content_space_rect", rect, value); |
| 65 | 65 |
| 66 bool rect_is_clipped; | 66 bool rect_is_clipped; |
| 67 gfx::QuadF rect_as_target_space_quad = MathUtil::MapQuad( | 67 gfx::QuadF rect_as_target_space_quad = MathUtil::MapQuad( |
| 68 shared_quad_state->content_to_target_transform, | 68 shared_quad_state->content_to_target_transform, |
| 69 gfx::QuadF(rect), | 69 gfx::QuadF(rect), |
| 70 &rect_is_clipped); | 70 &rect_is_clipped); |
| (...skipping 26 matching lines...) Expand all Loading... |
| 97 visible_rect_as_target_space_quad, value); | 97 visible_rect_as_target_space_quad, value); |
| 98 | 98 |
| 99 value->SetBoolean("visible_rect_is_clipped", visible_rect_is_clipped); | 99 value->SetBoolean("visible_rect_is_clipped", visible_rect_is_clipped); |
| 100 | 100 |
| 101 value->SetBoolean("needs_blending", needs_blending); | 101 value->SetBoolean("needs_blending", needs_blending); |
| 102 value->SetBoolean("should_draw_with_blending", ShouldDrawWithBlending()); | 102 value->SetBoolean("should_draw_with_blending", ShouldDrawWithBlending()); |
| 103 ExtendValue(value); | 103 ExtendValue(value); |
| 104 } | 104 } |
| 105 | 105 |
| 106 } // namespace cc | 106 } // namespace cc |
| OLD | NEW |