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

Unified Diff: content/renderer/pepper/pepper_graphics_2d_host.cc

Issue 2361903004: Revert temporary device independent bitmap (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/pepper/pepper_graphics_2d_host.cc
diff --git a/content/renderer/pepper/pepper_graphics_2d_host.cc b/content/renderer/pepper/pepper_graphics_2d_host.cc
index b23316cffddc7c3dfc9410f4405825ba8262829f..ea767e63ea906873500714aef57702a534c5dea5 100644
--- a/content/renderer/pepper/pepper_graphics_2d_host.cc
+++ b/content/renderer/pepper/pepper_graphics_2d_host.cc
@@ -354,14 +354,6 @@ void PepperGraphics2DHost::Paint(blink::WebCanvas* canvas,
canvas->drawRect(sk_invalidate_rect, paint);
}
- SkBitmap image;
- // Copy to device independent bitmap when target canvas doesn't support
- // platform paint.
- if (!skia::SupportsPlatformPaint(canvas))
- backing_bitmap.copyTo(&image, kN32_SkColorType);
- else
- image = backing_bitmap;
-
SkPaint paint;
if (is_always_opaque_) {
// When we know the device is opaque, we can disable blending for slightly
@@ -374,7 +366,8 @@ void PepperGraphics2DHost::Paint(blink::WebCanvas* canvas,
canvas->scale(scale_, scale_);
pixel_origin.scale(1.0f / scale_);
}
- canvas->drawBitmap(image, pixel_origin.x(), pixel_origin.y(), &paint);
+ canvas->drawBitmap(backing_bitmap, pixel_origin.x(), pixel_origin.y(),
+ &paint);
}
void PepperGraphics2DHost::ViewInitiatedPaint() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698