| 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/frame/UseCounter.h" | 8 #include "core/frame/UseCounter.h" |
| 9 #include "core/layout/ImageQualityController.h" | 9 #include "core/layout/ImageQualityController.h" |
| 10 #include "core/layout/LayoutBoxModelObject.h" | 10 #include "core/layout/LayoutBoxModelObject.h" |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "PaintImage", "
data", | 67 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "PaintImage", "
data", |
| 68 InspectorPaintImageEvent::data(m_layoutObject, *styleImage)); | 68 InspectorPaintImageEvent::data(m_layoutObject, *styleImage)); |
| 69 | 69 |
| 70 for (NinePiece piece = MinPiece; piece < MaxPiece; ++piece) { | 70 for (NinePiece piece = MinPiece; piece < MaxPiece; ++piece) { |
| 71 NinePieceImageGrid::NinePieceDrawInfo drawInfo = grid.getNinePieceDrawIn
fo(piece); | 71 NinePieceImageGrid::NinePieceDrawInfo drawInfo = grid.getNinePieceDrawIn
fo(piece); |
| 72 | 72 |
| 73 if (drawInfo.isDrawable) { | 73 if (drawInfo.isDrawable) { |
| 74 if (drawInfo.isCornerPiece) { | 74 if (drawInfo.isCornerPiece) { |
| 75 graphicsContext->drawImage(image.get(), drawInfo.destination, dr
awInfo.source, op); | 75 graphicsContext->drawImage(image.get(), drawInfo.destination, dr
awInfo.source, op); |
| 76 } else { | 76 } else { |
| 77 graphicsContext->drawTiledImage(image.get(), enclosingIntRect(dr
awInfo.destination), | 77 graphicsContext->drawTiledImage(image.get(), drawInfo.destinatio
n, |
| 78 enclosingIntRect(drawInfo.source), drawInfo.tileScale, drawI
nfo.tileRule.horizontal, | 78 drawInfo.source, drawInfo.tileScale, drawInfo.tileRule.horiz
ontal, |
| 79 drawInfo.tileRule.vertical, op); | 79 drawInfo.tileRule.vertical, op); |
| 80 } | 80 } |
| 81 } | 81 } |
| 82 } | 82 } |
| 83 | 83 |
| 84 graphicsContext->setImageInterpolationQuality(previousInterpolationQuality); | 84 graphicsContext->setImageInterpolationQuality(previousInterpolationQuality); |
| 85 return true; | 85 return true; |
| 86 } | 86 } |
| 87 | 87 |
| 88 } // namespace blink | 88 } // namespace blink |
| OLD | NEW |