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

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

Issue 2727133002: Remove ColorBehavior argument to Image::imageForCurrentFrame (Closed)
Patch Set: Rebase Created 3 years, 9 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 "gpu/command_buffer/common/mailbox.h" 8 #include "gpu/command_buffer/common/mailbox.h"
9 #include "gpu/command_buffer/common/sync_token.h" 9 #include "gpu/command_buffer/common/sync_token.h"
10 #include "platform/graphics/Image.h" 10 #include "platform/graphics/Image.h"
11 #include "third_party/khronos/GLES2/gl2.h" 11 #include "third_party/khronos/GLES2/gl2.h"
12 #include "third_party/skia/include/core/SkRefCnt.h" 12 #include "third_party/skia/include/core/SkRefCnt.h"
13 13
14 namespace blink { 14 namespace blink {
15 15
16 class WebGraphicsContext3DProvider; 16 class WebGraphicsContext3DProvider;
17 17
18 class PLATFORM_EXPORT StaticBitmapImage : public Image { 18 class PLATFORM_EXPORT StaticBitmapImage : public Image {
19 public: 19 public:
20 static PassRefPtr<StaticBitmapImage> create(sk_sp<SkImage>); 20 static PassRefPtr<StaticBitmapImage> create(sk_sp<SkImage>);
21 21
22 // Methods overrided by all sub-classes 22 // Methods overrided by all sub-classes
23 virtual ~StaticBitmapImage() {} 23 virtual ~StaticBitmapImage() {}
24 bool currentFrameKnownToBeOpaque(MetadataMode = UseCurrentMetadata) = 0; 24 bool currentFrameKnownToBeOpaque(MetadataMode = UseCurrentMetadata) = 0;
25 sk_sp<SkImage> imageForCurrentFrame(const ColorBehavior&) = 0; 25 sk_sp<SkImage> imageForCurrentFrame() = 0;
26 void draw(PaintCanvas*, 26 void draw(PaintCanvas*,
27 const PaintFlags&, 27 const PaintFlags&,
28 const FloatRect& dstRect, 28 const FloatRect& dstRect,
29 const FloatRect& srcRect, 29 const FloatRect& srcRect,
30 RespectImageOrientationEnum, 30 RespectImageOrientationEnum,
31 ImageClampingMode) = 0; 31 ImageClampingMode) = 0;
32 32
33 // Methods have common implementation for all sub-classes 33 // Methods have common implementation for all sub-classes
34 bool currentFrameIsComplete() override { return true; } 34 bool currentFrameIsComplete() override { return true; }
35 void destroyDecodedData() {} 35 void destroyDecodedData() {}
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 // info. They applied to both UnacceleratedStaticBitmapImage and 78 // info. They applied to both UnacceleratedStaticBitmapImage and
79 // AcceleratedStaticBitmapImage. To change these two properties, the call 79 // AcceleratedStaticBitmapImage. To change these two properties, the call
80 // site would have to call the API setOriginClean() and setPremultiplied(). 80 // site would have to call the API setOriginClean() and setPremultiplied().
81 bool m_isOriginClean = true; 81 bool m_isOriginClean = true;
82 bool m_isPremultiplied = true; 82 bool m_isPremultiplied = true;
83 }; 83 };
84 84
85 } // namespace blink 85 } // namespace blink
86 86
87 #endif 87 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698