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

Unified Diff: webkit/glue/webplugin_impl.cc

Issue 42056: Basic windowless plugins, try 2. (Closed)
Patch Set: review comments Created 11 years, 9 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/glue/plugins/webplugin_delegate_impl_gtk.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/webplugin_impl.cc
diff --git a/webkit/glue/webplugin_impl.cc b/webkit/glue/webplugin_impl.cc
index 09b69745d9825b74c4ab06a69a4dc354591317ce..5027d5ad39ffb4d8cb289a9e5e144f5630389f12 100644
--- a/webkit/glue/webplugin_impl.cc
+++ b/webkit/glue/webplugin_impl.cc
@@ -718,15 +718,12 @@ void WebPluginImpl::paint(WebCore::GraphicsContext* gc,
gc->translate(static_cast<float>(origin.x()),
static_cast<float>(origin.y()));
-#if defined(OS_WIN)
+#if defined(OS_WIN) || defined(OS_LINUX)
// Note that |context| is only used when in windowless mode.
gfx::NativeDrawingContext context =
gc->platformContext()->canvas()->beginPlatformPaint();
-#elif defined (OS_MACOSX)
+#elif defined(OS_MACOSX)
gfx::NativeDrawingContext context = gc->platformContext();
-#else
- // TODO(port): the equivalent of the above.
- void* context = NULL; // Temporary, to reduce ifdefs.
#endif
WebCore::IntRect window_rect =
@@ -735,7 +732,7 @@ void WebPluginImpl::paint(WebCore::GraphicsContext* gc,
delegate_->Paint(context, webkit_glue::FromIntRect(window_rect));
-#if defined(OS_WIN)
+#if defined(OS_WIN) || defined(OS_LINUX)
gc->platformContext()->canvas()->endPlatformPaint();
#endif
gc->restore();
« no previous file with comments | « webkit/glue/plugins/webplugin_delegate_impl_gtk.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698