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

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

Issue 2157953002: Change filter quality when scaling-down in drawImage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 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 #ifndef StaticBitmapImage_h 5 #ifndef StaticBitmapImage_h
6 #define StaticBitmapImage_h 6 #define StaticBitmapImage_h
7 7
8 #include "platform/graphics/Image.h" 8 #include "platform/graphics/Image.h"
9 #include "public/platform/WebExternalTextureMailbox.h" 9 #include "public/platform/WebExternalTextureMailbox.h"
10 #include "third_party/khronos/GLES2/gl2.h" 10 #include "third_party/khronos/GLES2/gl2.h"
11 11
12 namespace blink { 12 namespace blink {
13 13
14 class WebGraphicsContext3DProvider; 14 class WebGraphicsContext3DProvider;
15 15
16 class PLATFORM_EXPORT StaticBitmapImage final : public Image { 16 class PLATFORM_EXPORT StaticBitmapImage final : public Image {
17 public: 17 public:
18 ~StaticBitmapImage() override; 18 ~StaticBitmapImage() override;
19 19
20 bool currentFrameIsComplete() override { return true; } 20 bool currentFrameIsComplete() override { return true; }
21 21
22 static PassRefPtr<StaticBitmapImage> create(PassRefPtr<SkImage>); 22 static PassRefPtr<StaticBitmapImage> create(PassRefPtr<SkImage>);
23 static PassRefPtr<StaticBitmapImage> create(WebExternalTextureMailbox&); 23 static PassRefPtr<StaticBitmapImage> create(WebExternalTextureMailbox&);
24 virtual void destroyDecodedData() { } 24 virtual void destroyDecodedData() { }
25 virtual bool currentFrameKnownToBeOpaque(MetadataMode = UseCurrentMetadata); 25 virtual bool currentFrameKnownToBeOpaque(MetadataMode = UseCurrentMetadata);
26 virtual IntSize size() const; 26 virtual IntSize size() const;
27 void draw(SkCanvas*, const SkPaint&, const FloatRect& dstRect, const FloatRe ct& srcRect, RespectImageOrientationEnum, ImageClampingMode) override; 27 void draw(SkCanvas*, const SkPaint&, const FloatRect& dstRect, const FloatRe ct& srcRect, bool imageSmoothingEnabled, RespectImageOrientationEnum, ImageClamp ingMode) override;
28 28
29 PassRefPtr<SkImage> imageForCurrentFrame() override; 29 PassRefPtr<SkImage> imageForCurrentFrame() override;
30 30
31 bool originClean() const { return m_isOriginClean; } 31 bool originClean() const { return m_isOriginClean; }
32 void setOriginClean(bool flag) { m_isOriginClean = flag; } 32 void setOriginClean(bool flag) { m_isOriginClean = flag; }
33 bool isPremultiplied() const { return m_isPremultiplied; } 33 bool isPremultiplied() const { return m_isPremultiplied; }
34 void setPremultiplied(bool flag) { m_isPremultiplied = flag; } 34 void setPremultiplied(bool flag) { m_isPremultiplied = flag; }
35 void copyToTexture(WebGraphicsContext3DProvider*, GLuint, GLenum, GLenum, bo ol); 35 void copyToTexture(WebGraphicsContext3DProvider*, GLuint, GLenum, GLenum, bo ol);
36 bool isTextureBacked() override; 36 bool isTextureBacked() override;
37 bool hasMailbox() { return m_mailbox.textureSize.width != 0 && m_mailbox.tex tureSize.height != 0; } 37 bool hasMailbox() { return m_mailbox.textureSize.width != 0 && m_mailbox.tex tureSize.height != 0; }
(...skipping 11 matching lines...) Expand all
49 WebExternalTextureMailbox m_mailbox; 49 WebExternalTextureMailbox m_mailbox;
50 bool m_isOriginClean = true; 50 bool m_isOriginClean = true;
51 // The premultiply info is stored here because the SkImage API 51 // The premultiply info is stored here because the SkImage API
52 // doesn't expose this info. 52 // doesn't expose this info.
53 bool m_isPremultiplied = true; 53 bool m_isPremultiplied = true;
54 }; 54 };
55 55
56 } // namespace blink 56 } // namespace blink
57 57
58 #endif 58 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698