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 "config.h" | 5 #include "config.h" |
6 #include "core/paint/NinePieceImagePainter.h" | 6 #include "core/paint/NinePieceImagePainter.h" |
7 | 7 |
8 #include "core/layout/ImageQualityController.h" | 8 #include "core/layout/ImageQualityController.h" |
9 #include "core/layout/LayoutBoxModelObject.h" | 9 #include "core/layout/LayoutBoxModelObject.h" |
10 #include "core/paint/BoxPainter.h" | 10 #include "core/paint/BoxPainter.h" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 graphicsContext->setImageInterpolationQuality(interpolationQuality); | 59 graphicsContext->setImageInterpolationQuality(interpolationQuality); |
60 | 60 |
61 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "PaintImage", "
data", | 61 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "PaintImage", "
data", |
62 InspectorPaintImageEvent::data(m_layoutObject, *styleImage)); | 62 InspectorPaintImageEvent::data(m_layoutObject, *styleImage)); |
63 | 63 |
64 for (NinePiece piece = MinPiece; piece < MaxPiece; ++piece) { | 64 for (NinePiece piece = MinPiece; piece < MaxPiece; ++piece) { |
65 NinePieceImageGrid::NinePieceDrawInfo drawInfo = grid.getNinePieceDrawIn
fo(piece); | 65 NinePieceImageGrid::NinePieceDrawInfo drawInfo = grid.getNinePieceDrawIn
fo(piece); |
66 | 66 |
67 if (drawInfo.isDrawable) { | 67 if (drawInfo.isDrawable) { |
68 if (drawInfo.isCornerPiece) { | 68 if (drawInfo.isCornerPiece) { |
69 graphicsContext->drawImage(image.get(), drawInfo.destination, dr
awInfo.source, op); | 69 graphicsContext->drawImage(image.get(), drawInfo.destination, dr
awInfo.source, KURL(), op); // TODO(davve): empty url |
70 } else { | 70 } else { |
71 graphicsContext->drawTiledImage(image.get(), enclosingIntRect(dr
awInfo.destination), | 71 graphicsContext->drawTiledImage(image.get(), enclosingIntRect(dr
awInfo.destination), |
72 enclosingIntRect(drawInfo.source), drawInfo.tileScale, drawI
nfo.tileRule.horizontal, | 72 enclosingIntRect(drawInfo.source), drawInfo.tileScale, KURL(
), drawInfo.tileRule.horizontal, // TODO(davve): empty url |
73 drawInfo.tileRule.vertical, op); | 73 drawInfo.tileRule.vertical, op); |
74 } | 74 } |
75 } | 75 } |
76 } | 76 } |
77 | 77 |
78 graphicsContext->setImageInterpolationQuality(previousInterpolationQuality); | 78 graphicsContext->setImageInterpolationQuality(previousInterpolationQuality); |
79 return true; | 79 return true; |
80 } | 80 } |
81 | 81 |
82 } // namespace blink | 82 } // namespace blink |
OLD | NEW |