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

Side by Side Diff: webkit/plugins/npapi/webplugin_delegate_impl_gtk.cc

Issue 9764007: Prevent npapi plugin paint when SkPicture based painting is used. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | webkit/plugins/npapi/webplugin_delegate_impl_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "webkit/plugins/npapi/webplugin_delegate_impl.h" 5 #include "webkit/plugins/npapi/webplugin_delegate_impl.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include <gtk/gtk.h> 10 #include <gtk/gtk.h>
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 plugin_->SetWindow(handle); 103 plugin_->SetWindow(handle);
104 return true; 104 return true;
105 } 105 }
106 106
107 void WebPluginDelegateImpl::PlatformDestroyInstance() { 107 void WebPluginDelegateImpl::PlatformDestroyInstance() {
108 // Nothing to do here. 108 // Nothing to do here.
109 } 109 }
110 110
111 void WebPluginDelegateImpl::Paint(WebKit::WebCanvas* canvas, 111 void WebPluginDelegateImpl::Paint(WebKit::WebCanvas* canvas,
112 const gfx::Rect& rect) { 112 const gfx::Rect& rect) {
113 if (!windowless_) 113 if (!windowless_ || !skia::SupportsPlatformPaint(canvas))
114 return; 114 return;
115 skia::ScopedPlatformPaint scoped_platform_paint(canvas); 115 skia::ScopedPlatformPaint scoped_platform_paint(canvas);
116 cairo_t* context = scoped_platform_paint.GetPlatformSurface(); 116 cairo_t* context = scoped_platform_paint.GetPlatformSurface();
117 WindowlessPaint(context, rect); 117 WindowlessPaint(context, rect);
118 } 118 }
119 119
120 bool WebPluginDelegateImpl::WindowedCreatePlugin() { 120 bool WebPluginDelegateImpl::WindowedCreatePlugin() {
121 DCHECK(!windowed_handle_); 121 DCHECK(!windowed_handle_);
122 DCHECK(!plug_); 122 DCHECK(!plug_);
123 123
(...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after
758 // as someone might be setting the cursor in the main process as well. 758 // as someone might be setting the cursor in the main process as well.
759 *cursor = current_windowless_cursor_; 759 *cursor = current_windowless_cursor_;
760 } 760 }
761 #endif 761 #endif
762 762
763 return ret; 763 return ret;
764 } 764 }
765 765
766 } // namespace npapi 766 } // namespace npapi
767 } // namespace webkit 767 } // namespace webkit
OLDNEW
« no previous file with comments | « no previous file | webkit/plugins/npapi/webplugin_delegate_impl_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698