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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/UnacceleratedStaticBitmapImage.cpp

Issue 2523673004: [NOT FOR COMMIT] Fully replace SkCanvas uses.
Patch Set: Support Android build. Created 3 years, 12 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "platform/graphics/UnacceleratedStaticBitmapImage.h" 5 #include "platform/graphics/UnacceleratedStaticBitmapImage.h"
6 6
7 #include "third_party/skia/include/core/SkImage.h" 7 #include "third_party/skia/include/core/SkImage.h"
8 8
9 namespace blink { 9 namespace blink {
10 10
(...skipping 11 matching lines...) Expand all
22 UnacceleratedStaticBitmapImage::~UnacceleratedStaticBitmapImage() {} 22 UnacceleratedStaticBitmapImage::~UnacceleratedStaticBitmapImage() {}
23 23
24 IntSize UnacceleratedStaticBitmapImage::size() const { 24 IntSize UnacceleratedStaticBitmapImage::size() const {
25 return IntSize(m_image->width(), m_image->height()); 25 return IntSize(m_image->width(), m_image->height());
26 } 26 }
27 27
28 bool UnacceleratedStaticBitmapImage::currentFrameKnownToBeOpaque(MetadataMode) { 28 bool UnacceleratedStaticBitmapImage::currentFrameKnownToBeOpaque(MetadataMode) {
29 return m_image->isOpaque(); 29 return m_image->isOpaque();
30 } 30 }
31 31
32 void UnacceleratedStaticBitmapImage::draw(SkCanvas* canvas, 32 void UnacceleratedStaticBitmapImage::draw(CdlCanvas* canvas,
33 const SkPaint& paint, 33 const CdlPaint& paint,
34 const FloatRect& dstRect, 34 const FloatRect& dstRect,
35 const FloatRect& srcRect, 35 const FloatRect& srcRect,
36 RespectImageOrientationEnum, 36 RespectImageOrientationEnum,
37 ImageClampingMode clampMode) { 37 ImageClampingMode clampMode) {
38 StaticBitmapImage::drawHelper(canvas, paint, dstRect, srcRect, clampMode, 38 StaticBitmapImage::drawHelper(canvas, paint, dstRect, srcRect, clampMode,
39 m_image); 39 m_image);
40 } 40 }
41 41
42 sk_sp<SkImage> UnacceleratedStaticBitmapImage::imageForCurrentFrame() { 42 sk_sp<SkImage> UnacceleratedStaticBitmapImage::imageForCurrentFrame() {
43 return m_image; 43 return m_image;
44 } 44 }
45 45
46 } // namespace blink 46 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698