| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "platform/graphics/StaticBitmapImage.h" | 6 #include "platform/graphics/StaticBitmapImage.h" |
| 7 | 7 |
| 8 #include "platform/graphics/GraphicsContext.h" | 8 #include "platform/graphics/GraphicsContext.h" |
| 9 #include "platform/graphics/ImageObserver.h" | 9 #include "platform/graphics/ImageObserver.h" |
| 10 #include "platform/graphics/skia/NativeImageSkia.h" | |
| 11 #include "third_party/skia/include/core/SkCanvas.h" | 10 #include "third_party/skia/include/core/SkCanvas.h" |
| 12 #include "third_party/skia/include/core/SkImage.h" | 11 #include "third_party/skia/include/core/SkImage.h" |
| 13 #include "third_party/skia/include/core/SkPaint.h" | 12 #include "third_party/skia/include/core/SkPaint.h" |
| 14 #include "third_party/skia/include/core/SkShader.h" | 13 #include "third_party/skia/include/core/SkShader.h" |
| 15 | 14 |
| 16 namespace blink { | 15 namespace blink { |
| 17 | 16 |
| 18 PassRefPtr<Image> StaticBitmapImage::create(PassRefPtr<SkImage> image) | 17 PassRefPtr<Image> StaticBitmapImage::create(PassRefPtr<SkImage> image) |
| 19 { | 18 { |
| 20 return adoptRef(new StaticBitmapImage(image)); | 19 return adoptRef(new StaticBitmapImage(image)); |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 | 59 |
| 61 canvas->drawImageRect(m_image.get(), &srcSkRect, dstSkRect, &paint); | 60 canvas->drawImageRect(m_image.get(), &srcSkRect, dstSkRect, &paint); |
| 62 canvas->restoreToCount(initialSaveCount); | 61 canvas->restoreToCount(initialSaveCount); |
| 63 } | 62 } |
| 64 | 63 |
| 65 if (ImageObserver* observer = imageObserver()) | 64 if (ImageObserver* observer = imageObserver()) |
| 66 observer->didDraw(this); | 65 observer->didDraw(this); |
| 67 } | 66 } |
| 68 | 67 |
| 69 } // namespace blink | 68 } // namespace blink |
| OLD | NEW |