Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Side by Side Diff: third_party/WebKit/Source/core/paint/NinePieceImagePainter.cpp

Issue 2847303002: Remove unnecessary zoom argument from GetImage() as its value is always available through the Layou… (Closed)
Patch Set: (rebased) Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/ListMarkerPainter.cpp ('k') | third_party/WebKit/Source/core/paint/SVGImagePainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698