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

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

Issue 2712083002: color: Remove blink pre-conversion code (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 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 #ifndef PlaceholderImage_h 5 #ifndef PlaceholderImage_h
6 #define PlaceholderImage_h 6 #define PlaceholderImage_h
7 7
8 #include "platform/SharedBuffer.h" 8 #include "platform/SharedBuffer.h"
9 #include "platform/geometry/IntSize.h" 9 #include "platform/geometry/IntSize.h"
10 #include "platform/graphics/Image.h" 10 #include "platform/graphics/Image.h"
(...skipping 19 matching lines...) Expand all
30 30
31 IntSize size() const override { return m_size; } 31 IntSize size() const override { return m_size; }
32 32
33 sk_sp<SkImage> imageForCurrentFrame(const ColorBehavior&) override; 33 sk_sp<SkImage> imageForCurrentFrame(const ColorBehavior&) override;
34 34
35 void draw(PaintCanvas*, 35 void draw(PaintCanvas*,
36 const PaintFlags&, 36 const PaintFlags&,
37 const FloatRect& destRect, 37 const FloatRect& destRect,
38 const FloatRect& srcRect, 38 const FloatRect& srcRect,
39 RespectImageOrientationEnum, 39 RespectImageOrientationEnum,
40 ImageClampingMode, 40 ImageClampingMode) override;
41 const ColorBehavior&) override;
42 41
43 void destroyDecodedData() override; 42 void destroyDecodedData() override;
44 43
45 private: 44 private:
46 PlaceholderImage(ImageObserver* observer, const IntSize& size) 45 PlaceholderImage(ImageObserver* observer, const IntSize& size)
47 : Image(observer), m_size(size) {} 46 : Image(observer), m_size(size) {}
48 47
49 bool currentFrameHasSingleSecurityOrigin() const override { return true; } 48 bool currentFrameHasSingleSecurityOrigin() const override { return true; }
50 49
51 bool currentFrameKnownToBeOpaque(MetadataMode = UseCurrentMetadata) override { 50 bool currentFrameKnownToBeOpaque(MetadataMode = UseCurrentMetadata) override {
52 // Placeholder images are translucent. 51 // Placeholder images are translucent.
53 return false; 52 return false;
54 } 53 }
55 54
56 IntSize m_size; 55 IntSize m_size;
57 // Lazily initialized. 56 // Lazily initialized.
58 sk_sp<SkImage> m_imageForCurrentFrame; 57 sk_sp<SkImage> m_imageForCurrentFrame;
59 }; 58 };
60 59
61 } // namespace blink 60 } // namespace blink
62 61
63 #endif 62 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698