OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "cc/quads/filter_draw_quad.h" |
| 6 |
| 7 #include "base/debug/trace_event_argument.h" |
| 8 #include "cc/output/filter_operations.h" |
| 9 #include "base/logging.h" |
| 10 #include "base/values.h" |
| 11 |
| 12 namespace cc { |
| 13 |
| 14 FilterDrawQuad::FilterDrawQuad() { |
| 15 } |
| 16 |
| 17 void FilterDrawQuad::SetNew(const SharedQuadState* shared_quad_state, |
| 18 const gfx::Rect& visible_rect, |
| 19 const gfx::Rect& src_rect, |
| 20 const gfx::Rect& dst_draw_rect, |
| 21 const FilterOperations& background_filters) { |
| 22 SetAll(shared_quad_state, |
| 23 rect, |
| 24 opaque_rect, |
| 25 visible_rect, |
| 26 needs_blending, |
| 27 src_rect, |
| 28 dst_draw_rect, |
| 29 background_filters); |
| 30 } |
| 31 |
| 32 void FilterDrawQuad::SetAll(const SharedQuadState* shared_quad_state, |
| 33 const gfx::Rect& rect, |
| 34 const gfx::Rect& opaque_rect, |
| 35 const gfx::Rect& visible_rect, |
| 36 bool needs_blending, |
| 37 const gfx::Rect& src_rect, |
| 38 const gfx::Rect& dst_draw_rect, |
| 39 const FilterOperations& background_filters) { |
| 40 DrawQuad::SetAll(shared_quad_state, |
| 41 DrawQuad::FILTER_CONTENT, |
| 42 rect, |
| 43 opaque_rect, |
| 44 visible_rect, |
| 45 needs_blending); |
| 46 this->src_filter_rect_ = src_rect; |
| 47 this->draw_filter_rect_ = dst_draw_rect; |
| 48 this->filter_operations_ = background_filters; |
| 49 } |
| 50 |
| 51 void FilterDrawQuad::IterateResources( |
| 52 const ResourceIteratorCallback& callback) { |
| 53 } |
| 54 |
| 55 const FilterDrawQuad* FilterDrawQuad::MaterialCast(const DrawQuad* quad) { |
| 56 DCHECK(quad->material == DrawQuad::FILTER_CONTENT); |
| 57 return static_cast<const FilterDrawQuad*>(quad); |
| 58 } |
| 59 |
| 60 void FilterDrawQuad::ExtendValue(base::debug::TracedValue* value) const { |
| 61 } |
| 62 |
| 63 } // namespace cc |
OLD | NEW |