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

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

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 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 static PassRefPtr<TestImage> create(const IntSize& size, bool opaque) { 43 static PassRefPtr<TestImage> create(const IntSize& size, bool opaque) {
44 return adoptRef(new TestImage(size, opaque)); 44 return adoptRef(new TestImage(size, opaque));
45 } 45 }
46 46
47 bool currentFrameKnownToBeOpaque(MetadataMode = UseCurrentMetadata) override { 47 bool currentFrameKnownToBeOpaque(MetadataMode = UseCurrentMetadata) override {
48 return m_image->isOpaque(); 48 return m_image->isOpaque();
49 } 49 }
50 50
51 IntSize size() const override { return m_size; } 51 IntSize size() const override { return m_size; }
52 52
53 sk_sp<SkImage> imageForCurrentFrame(const ColorBehavior&) override { 53 sk_sp<SkImage> imageForCurrentFrame() override { return m_image; }
54 return m_image;
55 }
56 54
57 void destroyDecodedData() override { 55 void destroyDecodedData() override {
58 // Image pure virtual stub. 56 // Image pure virtual stub.
59 } 57 }
60 58
61 void draw(PaintCanvas*, 59 void draw(PaintCanvas*,
62 const PaintFlags&, 60 const PaintFlags&,
63 const FloatRect&, 61 const FloatRect&,
64 const FloatRect&, 62 const FloatRect&,
65 RespectImageOrientationEnum, 63 RespectImageOrientationEnum,
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 ASSERT_FALSE(graphicsLayer->contentsLayer()); 124 ASSERT_FALSE(graphicsLayer->contentsLayer());
127 125
128 graphicsLayer->setContentsToImage(opaqueImage.get()); 126 graphicsLayer->setContentsToImage(opaqueImage.get());
129 ASSERT_TRUE(graphicsLayer->contentsLayer()->opaque()); 127 ASSERT_TRUE(graphicsLayer->contentsLayer()->opaque());
130 128
131 graphicsLayer->setContentsToImage(nonOpaqueImage.get()); 129 graphicsLayer->setContentsToImage(nonOpaqueImage.get());
132 ASSERT_FALSE(graphicsLayer->contentsLayer()->opaque()); 130 ASSERT_FALSE(graphicsLayer->contentsLayer()->opaque());
133 } 131 }
134 132
135 } // namespace blink 133 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/Image.cpp ('k') | third_party/WebKit/Source/platform/graphics/ImagePattern.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698