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

Unified Diff: content/renderer/npapi/webplugin_delegate_proxy.cc

Issue 1432443004: Remove SkDevice and SkBaseDevice outside skia/ext/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pass SkPixmap by pointer to MakeBitmapOpaque Created 5 years, 1 month 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: content/renderer/npapi/webplugin_delegate_proxy.cc
diff --git a/content/renderer/npapi/webplugin_delegate_proxy.cc b/content/renderer/npapi/webplugin_delegate_proxy.cc
index edd39bdad7c29ccad1c3605b16415d9a5693f106..054fa47d38305446a02e184ccb3517bcc223379c 100644
--- a/content/renderer/npapi/webplugin_delegate_proxy.cc
+++ b/content/renderer/npapi/webplugin_delegate_proxy.cc
@@ -571,8 +571,10 @@ void WebPluginDelegateProxy::UpdateGeometry(const gfx::Rect& window_rect,
if (uses_shared_bitmaps_) {
if (!front_buffer_canvas() ||
- (window_rect.width() != front_buffer_canvas()->getDevice()->width() ||
- window_rect.height() != front_buffer_canvas()->getDevice()->height()))
+ (window_rect.width() !=
+ front_buffer_canvas()->getBaseLayerSize().width() ||
+ window_rect.height() !=
+ front_buffer_canvas()->getBaseLayerSize().height()))
{
bitmaps_changed = true;
@@ -689,8 +691,7 @@ void WebPluginDelegateProxy::Paint(SkCanvas* canvas,
UpdateFrontBuffer(offset_rect, false);
}
- const SkBitmap& bitmap =
- front_buffer_canvas()->getDevice()->accessBitmap(false);
+ const SkBitmap bitmap = skia::ReadPixels(front_buffer_canvas());
SkPaint paint;
paint.setXfermodeMode(
transparent_ ? SkXfermode::kSrcATop_Mode : SkXfermode::kSrc_Mode);
« no previous file with comments | « content/renderer/android/synchronous_compositor_output_surface.cc ('k') | printing/metafile_skia_wrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698