OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2012 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 if (!best_fit_image_->GetImage()->IsSVGImage()) | 121 if (!best_fit_image_->GetImage()->IsSVGImage()) |
122 return best_fit_image_->GetImage(); | 122 return best_fit_image_->GetImage(); |
123 | 123 |
124 return SVGImageForContainer::Create(ToSVGImage(best_fit_image_->GetImage()), | 124 return SVGImageForContainer::Create(ToSVGImage(best_fit_image_->GetImage()), |
125 container_size, | 125 container_size, |
126 obj.StyleRef().EffectiveZoom(), url_); | 126 obj.StyleRef().EffectiveZoom(), url_); |
127 } | 127 } |
128 | 128 |
129 bool StyleFetchedImageSet::KnownToBeOpaque( | 129 bool StyleFetchedImageSet::KnownToBeOpaque( |
130 const LayoutObject& layout_object) const { | 130 const LayoutObject& layout_object) const { |
131 TRACE_EVENT1( | |
132 TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "PaintImage", "data", | |
133 InspectorPaintImageEvent::Data(&layout_object, *best_fit_image_.Get())); | |
134 return best_fit_image_->GetImage()->CurrentFrameKnownToBeOpaque( | 131 return best_fit_image_->GetImage()->CurrentFrameKnownToBeOpaque( |
135 Image::kPreCacheMetadata); | 132 Image::kPreCacheMetadata); |
136 } | 133 } |
137 | 134 |
138 DEFINE_TRACE(StyleFetchedImageSet) { | 135 DEFINE_TRACE(StyleFetchedImageSet) { |
139 visitor->Trace(best_fit_image_); | 136 visitor->Trace(best_fit_image_); |
140 visitor->Trace(image_set_value_); | 137 visitor->Trace(image_set_value_); |
141 StyleImage::Trace(visitor); | 138 StyleImage::Trace(visitor); |
142 } | 139 } |
143 | 140 |
144 } // namespace blink | 141 } // namespace blink |
OLD | NEW |