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

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

Issue 1925533003: High CPU and increased memory usage fix for high-res (GIF, WEBP...) animations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 IntSize size() const override 58 IntSize size() const override
59 { 59 {
60 return m_size; 60 return m_size;
61 } 61 }
62 62
63 PassRefPtr<SkImage> imageForCurrentFrame() override 63 PassRefPtr<SkImage> imageForCurrentFrame() override
64 { 64 {
65 return m_image; 65 return m_image;
66 } 66 }
67 67
68 void destroyDecodedData(bool) override 68 void destroyDecodedData() override
69 { 69 {
70 // Image pure virtual stub. 70 // Image pure virtual stub.
71 } 71 }
72 72
73 void draw(SkCanvas*, const SkPaint&, const FloatRect&, const FloatRect&, Res pectImageOrientationEnum, ImageClampingMode) override 73 void draw(SkCanvas*, const SkPaint&, const FloatRect&, const FloatRect&, Res pectImageOrientationEnum, ImageClampingMode) override
74 { 74 {
75 // Image pure virtual stub. 75 // Image pure virtual stub.
76 } 76 }
77 77
78 private: 78 private:
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 ASSERT_FALSE(graphicsLayer->contentsLayer()); 136 ASSERT_FALSE(graphicsLayer->contentsLayer());
137 137
138 graphicsLayer->setContentsToImage(opaqueImage.get()); 138 graphicsLayer->setContentsToImage(opaqueImage.get());
139 ASSERT_TRUE(graphicsLayer->contentsLayer()->opaque()); 139 ASSERT_TRUE(graphicsLayer->contentsLayer()->opaque());
140 140
141 graphicsLayer->setContentsToImage(nonOpaqueImage.get()); 141 graphicsLayer->setContentsToImage(nonOpaqueImage.get());
142 ASSERT_FALSE(graphicsLayer->contentsLayer()->opaque()); 142 ASSERT_FALSE(graphicsLayer->contentsLayer()->opaque());
143 } 143 }
144 144
145 } // namespace blink 145 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698