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

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

Issue 1482953002: Drop dependency on LayoutObject in fetch/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Compile fix Created 5 years 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
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/StaticBitmapImage.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "third_party/skia/include/core/SkCanvas.h" 10 #include "third_party/skia/include/core/SkCanvas.h"
(...skipping 15 matching lines...) Expand all
26 ASSERT(m_image); 26 ASSERT(m_image);
27 } 27 }
28 28
29 StaticBitmapImage::~StaticBitmapImage() { } 29 StaticBitmapImage::~StaticBitmapImage() { }
30 30
31 IntSize StaticBitmapImage::size() const 31 IntSize StaticBitmapImage::size() const
32 { 32 {
33 return IntSize(m_image->width(), m_image->height()); 33 return IntSize(m_image->width(), m_image->height());
34 } 34 }
35 35
36 bool StaticBitmapImage::currentFrameKnownToBeOpaque() 36 bool StaticBitmapImage::currentFrameKnownToBeOpaque(MetadataMode)
37 { 37 {
38 return m_image->isOpaque(); 38 return m_image->isOpaque();
39 } 39 }
40 40
41 void StaticBitmapImage::draw(SkCanvas* canvas, const SkPaint& paint, const Float Rect& dstRect, 41 void StaticBitmapImage::draw(SkCanvas* canvas, const SkPaint& paint, const Float Rect& dstRect,
42 const FloatRect& srcRect, RespectImageOrientationEnum, ImageClampingMode cla mpMode) 42 const FloatRect& srcRect, RespectImageOrientationEnum, ImageClampingMode cla mpMode)
43 { 43 {
44 ASSERT(dstRect.width() >= 0 && dstRect.height() >= 0); 44 ASSERT(dstRect.width() >= 0 && dstRect.height() >= 0);
45 ASSERT(srcRect.width() >= 0 && srcRect.height() >= 0); 45 ASSERT(srcRect.width() >= 0 && srcRect.height() >= 0);
46 46
(...skipping 12 matching lines...) Expand all
59 if (ImageObserver* observer = imageObserver()) 59 if (ImageObserver* observer = imageObserver())
60 observer->didDraw(this); 60 observer->didDraw(this);
61 } 61 }
62 62
63 PassRefPtr<SkImage> StaticBitmapImage::imageForCurrentFrame() 63 PassRefPtr<SkImage> StaticBitmapImage::imageForCurrentFrame()
64 { 64 {
65 return m_image; 65 return m_image;
66 } 66 }
67 67
68 } // namespace blink 68 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/StaticBitmapImage.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698