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

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: Rebasing. DCHECK. Thanks fmalita@. Created 4 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 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 IntSize size() const override 51 IntSize size() const override
52 { 52 {
53 return m_size; 53 return m_size;
54 } 54 }
55 55
56 PassRefPtr<SkImage> imageForCurrentFrame() override 56 PassRefPtr<SkImage> imageForCurrentFrame() override
57 { 57 {
58 return m_image; 58 return m_image;
59 } 59 }
60 60
61 void destroyDecodedData(bool) override 61 void destroyDecodedData() override
62 { 62 {
63 // Image pure virtual stub. 63 // Image pure virtual stub.
64 } 64 }
65 65
66 void draw(SkCanvas*, const SkPaint&, const FloatRect&, const FloatRect&, Res pectImageOrientationEnum, ImageClampingMode) override 66 void draw(SkCanvas*, const SkPaint&, const FloatRect&, const FloatRect&, Res pectImageOrientationEnum, ImageClampingMode) override
67 { 67 {
68 // Image pure virtual stub. 68 // Image pure virtual stub.
69 } 69 }
70 70
71 private: 71 private:
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 ASSERT_FALSE(graphicsLayer->contentsLayer()); 129 ASSERT_FALSE(graphicsLayer->contentsLayer());
130 130
131 graphicsLayer->setContentsToImage(opaqueImage.get()); 131 graphicsLayer->setContentsToImage(opaqueImage.get());
132 ASSERT_TRUE(graphicsLayer->contentsLayer()->opaque()); 132 ASSERT_TRUE(graphicsLayer->contentsLayer()->opaque());
133 133
134 graphicsLayer->setContentsToImage(nonOpaqueImage.get()); 134 graphicsLayer->setContentsToImage(nonOpaqueImage.get());
135 ASSERT_FALSE(graphicsLayer->contentsLayer()->opaque()); 135 ASSERT_FALSE(graphicsLayer->contentsLayer()->opaque());
136 } 136 }
137 137
138 } // namespace blink 138 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/Image.h ('k') | third_party/WebKit/Source/platform/graphics/StaticBitmapImage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698