| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "core/paint/NinePieceImagePainter.h" | 5 #include "core/paint/NinePieceImagePainter.h" |
| 6 | 6 |
| 7 #include "core/layout/ImageQualityController.h" | 7 #include "core/layout/ImageQualityController.h" |
| 8 #include "core/layout/LayoutBoxModelObject.h" | 8 #include "core/layout/LayoutBoxModelObject.h" |
| 9 #include "core/paint/BoxPainter.h" | 9 #include "core/paint/BoxPainter.h" |
| 10 #include "core/paint/NinePieceImageGrid.h" | 10 #include "core/paint/NinePieceImageGrid.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 IntSize image_size = RoundedIntSize( | 56 IntSize image_size = RoundedIntSize( |
| 57 style_image->ImageSize(layout_object_, 1, border_image_rect.Size())); | 57 style_image->ImageSize(layout_object_, 1, border_image_rect.Size())); |
| 58 | 58 |
| 59 IntRectOutsets border_widths(style.BorderTopWidth(), style.BorderRightWidth(), | 59 IntRectOutsets border_widths(style.BorderTopWidth(), style.BorderRightWidth(), |
| 60 style.BorderBottomWidth(), | 60 style.BorderBottomWidth(), |
| 61 style.BorderLeftWidth()); | 61 style.BorderLeftWidth()); |
| 62 NinePieceImageGrid grid(nine_piece_image, image_size, | 62 NinePieceImageGrid grid(nine_piece_image, image_size, |
| 63 PixelSnappedIntRect(border_image_rect), | 63 PixelSnappedIntRect(border_image_rect), |
| 64 border_widths); | 64 border_widths); |
| 65 | 65 |
| 66 RefPtr<Image> image = | 66 RefPtr<Image> image = style_image->GetImage(layout_object_, image_size); |
| 67 style_image->GetImage(layout_object_, image_size, style.EffectiveZoom()); | |
| 68 | 67 |
| 69 InterpolationQuality interpolation_quality = | 68 InterpolationQuality interpolation_quality = |
| 70 BoxPainter::ChooseInterpolationQuality(layout_object_, image.Get(), 0, | 69 BoxPainter::ChooseInterpolationQuality(layout_object_, image.Get(), 0, |
| 71 rect_with_outsets.Size()); | 70 rect_with_outsets.Size()); |
| 72 InterpolationQuality previous_interpolation_quality = | 71 InterpolationQuality previous_interpolation_quality = |
| 73 graphics_context.ImageInterpolationQuality(); | 72 graphics_context.ImageInterpolationQuality(); |
| 74 graphics_context.SetImageInterpolationQuality(interpolation_quality); | 73 graphics_context.SetImageInterpolationQuality(interpolation_quality); |
| 75 | 74 |
| 76 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "PaintImage", | 75 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "PaintImage", |
| 77 "data", | 76 "data", |
| (...skipping 14 matching lines...) Expand all Loading... |
| 92 draw_info.tile_rule.vertical, op); | 91 draw_info.tile_rule.vertical, op); |
| 93 } | 92 } |
| 94 } | 93 } |
| 95 } | 94 } |
| 96 | 95 |
| 97 graphics_context.SetImageInterpolationQuality(previous_interpolation_quality); | 96 graphics_context.SetImageInterpolationQuality(previous_interpolation_quality); |
| 98 return true; | 97 return true; |
| 99 } | 98 } |
| 100 | 99 |
| 101 } // namespace blink | 100 } // namespace blink |
| OLD | NEW |