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

Unified Diff: webkit/plugins/sad_plugin.cc

Issue 10392018: remove WEBKIT_USING_CG (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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 | « webkit/plugins/ppapi/ppapi_plugin_instance.cc ('k') | webkit/plugins/webview_plugin.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/sad_plugin.cc
diff --git a/webkit/plugins/sad_plugin.cc b/webkit/plugins/sad_plugin.cc
index bc8ef5327a9dfdbed4e51c10ae52c5381684bd57..184dc83fc11475761fb8619dc1bd3d9f95381c61 100644
--- a/webkit/plugins/sad_plugin.cc
+++ b/webkit/plugins/sad_plugin.cc
@@ -19,19 +19,11 @@ void PaintSadPlugin(WebKit::WebCanvas* webcanvas,
const int width = plugin_rect.width();
const int height = plugin_rect.height();
-#if WEBKIT_USING_SKIA
SkCanvas* canvas = webcanvas;
SkAutoCanvasRestore auto_restore(canvas, true);
// We draw the sad-plugin bitmap at the origin of canvas.
// Add a translation so that it appears at the origin of plugin rect.
canvas->translate(plugin_rect.x(), plugin_rect.y());
-#elif WEBKIT_USING_CG
- // Make a temporary canvas for the background image.
- scoped_ptr<SkCanvas> canvas(skia::CreateBitmapCanvas(width, height, false));
- // Flip the canvas, since the context expects flipped data.
- canvas->translate(0, height);
- canvas->scale(1, -1);
-#endif
SkPaint paint;
paint.setStyle(SkPaint::kFill_Style);
@@ -42,13 +34,6 @@ void PaintSadPlugin(WebKit::WebCanvas* webcanvas,
sad_plugin_bitmap,
SkIntToScalar(std::max(0, (width - sad_plugin_bitmap.width()) / 2)),
SkIntToScalar(std::max(0, (height - sad_plugin_bitmap.height()) / 2)));
-
- // It's slightly less code to make a big SkBitmap of the sad tab image and
- // then copy that to the screen than to use the native APIs. The small speed
- // penalty is not important when drawing crashed plugins.
-#if WEBKIT_USING_CG
- BlitCanvasToContext(webcanvas, plugin_rect, canvas.get(), gfx::Point(0, 0));
-#endif
}
} // namespace webkit
« no previous file with comments | « webkit/plugins/ppapi/ppapi_plugin_instance.cc ('k') | webkit/plugins/webview_plugin.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698