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

Unified Diff: third_party/WebKit/Source/platform/graphics/PlaceholderImage.h

Issue 2915353002: Stylize PlaceholderImages with icons. (Closed)
Patch Set: Addressed comments Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/graphics/PlaceholderImage.h
diff --git a/third_party/WebKit/Source/platform/graphics/PlaceholderImage.h b/third_party/WebKit/Source/platform/graphics/PlaceholderImage.h
index f87d166094328de69b7307572ceafddd281dca3b..cb46586326f6f7a05a5a9ea19f6cc934d97d716f 100644
--- a/third_party/WebKit/Source/platform/graphics/PlaceholderImage.h
+++ b/third_party/WebKit/Source/platform/graphics/PlaceholderImage.h
@@ -15,7 +15,10 @@
namespace blink {
+class FloatPoint;
class FloatRect;
+class FloatSize;
+class GraphicsContext;
class ImageObserver;
// A generated placeholder image that shows a translucent gray rectangle.
@@ -42,8 +45,7 @@ class PLATFORM_EXPORT PlaceholderImage final : public Image {
void DestroyDecodedData() override;
private:
- PlaceholderImage(ImageObserver* observer, const IntSize& size)
- : Image(observer), size_(size) {}
+ PlaceholderImage(ImageObserver*, const IntSize&);
bool CurrentFrameHasSingleSecurityOrigin() const override { return true; }
@@ -53,7 +55,16 @@ class PLATFORM_EXPORT PlaceholderImage final : public Image {
return false;
}
- IntSize size_;
+ void DrawPattern(GraphicsContext&,
+ const FloatRect& src_rect,
+ const FloatSize& scale,
+ const FloatPoint& phase,
+ SkBlendMode,
+ const FloatRect& dest_rect,
+ const FloatSize& repeat_spacing = FloatSize()) override;
+
+ const IntSize size_;
+
// Lazily initialized.
sk_sp<SkImage> image_for_current_frame_;
};
« no previous file with comments | « content/child/blink_platform_impl.cc ('k') | third_party/WebKit/Source/platform/graphics/PlaceholderImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698