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

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

Issue 799103002: Fix display list canvas not rendering correctly on high dpi displays (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: corrections Created 6 years 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
« no previous file with comments | « Source/platform/graphics/GraphicsContext.cpp ('k') | Source/platform/graphics/ImageBufferSurface.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/ImageBuffer.cpp
diff --git a/Source/platform/graphics/ImageBuffer.cpp b/Source/platform/graphics/ImageBuffer.cpp
index 384d3b15d003b668f120d8c0366424edd83989b2..f9aa678c3f57f7613f5d032facc94708c77508ce 100644
--- a/Source/platform/graphics/ImageBuffer.cpp
+++ b/Source/platform/graphics/ImageBuffer.cpp
@@ -265,23 +265,7 @@ void ImageBuffer::draw(GraphicsContext* context, const FloatRect& destRect, cons
return;
FloatRect srcRect = srcPtr ? *srcPtr : FloatRect(FloatPoint(), size());
- RefPtr<SkPicture> picture = m_surface->getPicture();
- if (picture) {
- context->drawPicture(picture.get(), destRect, srcRect, op, blendMode);
- return;
- }
-
- SkBitmap bitmap = m_surface->bitmap();
- // For ImageBufferSurface that enables cachedBitmap, Use the cached Bitmap for CPU side usage
- // if it is available, otherwise generate and use it.
- if (!context->isAccelerated() && m_surface->isAccelerated() && m_surface->cachedBitmapEnabled() && isSurfaceValid()) {
- m_surface->updateCachedBitmapIfNeeded();
- bitmap = m_surface->cachedBitmap();
- }
-
- RefPtr<Image> image = BitmapImage::create(NativeImageSkia::create(drawNeedsCopy(m_context.get(), context) ? deepSkBitmapCopy(bitmap) : bitmap));
-
- context->drawImage(image.get(), destRect, srcRect, op, blendMode, DoNotRespectImageOrientation);
+ m_surface->draw(context, destRect, srcRect, op, blendMode, drawNeedsCopy(m_context.get(), context));
}
void ImageBuffer::flush()
« no previous file with comments | « Source/platform/graphics/GraphicsContext.cpp ('k') | Source/platform/graphics/ImageBufferSurface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698