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

Unified Diff: Source/platform/graphics/ImageBufferSurface.cpp

Issue 1217893004: remove unused cachedBitmap from ImageBufferSurface (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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: Source/platform/graphics/ImageBufferSurface.cpp
diff --git a/Source/platform/graphics/ImageBufferSurface.cpp b/Source/platform/graphics/ImageBufferSurface.cpp
index 7eebf948ed7c1204aa075fffb40ecd7b452825e0..cb1ba454e7efaae984a161bb88e31166c798454e 100644
--- a/Source/platform/graphics/ImageBufferSurface.cpp
+++ b/Source/platform/graphics/ImageBufferSurface.cpp
@@ -76,21 +76,9 @@ const SkBitmap& ImageBufferSurface::bitmap()
return canvas()->getDevice()->accessBitmap(false);
}
-const SkBitmap& ImageBufferSurface::cachedBitmap() const
-{
- DEFINE_STATIC_LOCAL(SkBitmap, nullBitmap, ());
- return nullBitmap;
-}
-
void ImageBufferSurface::draw(GraphicsContext* context, const FloatRect& destRect, const FloatRect& srcRect, SkXfermode::Mode op)
{
SkBitmap bmp = bitmap();
- // For ImageBufferSurface that enables cachedBitmap, Use the cached bitmap for CPU side usage
- // if it is available, otherwise generate and use it.
- if (isAccelerated() && cachedBitmapEnabled() && isValid()) {
- updateCachedBitmapIfNeeded();
- bmp = cachedBitmap();
- }
RefPtr<Image> image = BitmapImage::create(bmp);
« no previous file with comments | « Source/platform/graphics/ImageBufferSurface.h ('k') | Source/platform/graphics/RecordingImageBufferSurface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698