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/glue/plugins/plugin_host.cc

Issue 1569005: Fix CoreGraphics and Core Animation drawing for QuickTime plugin (Closed)
Patch Set: Spacing fix Created 10 years, 8 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
« no previous file with comments | « no previous file | webkit/glue/plugins/webplugin_delegate_impl_mac.mm » ('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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/glue/plugins/plugin_host.h" 5 #include "webkit/glue/plugins/plugin_host.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/scoped_ptr.h" 9 #include "base/scoped_ptr.h"
10 #include "base/string_piece.h" 10 #include "base/string_piece.h"
(...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after
787 case NPNVsupportsCocoaBool: { 787 case NPNVsupportsCocoaBool: {
788 // we do support these drawing and event models. 788 // we do support these drawing and event models.
789 NPBool* supports_model = reinterpret_cast<NPBool*>(value); 789 NPBool* supports_model = reinterpret_cast<NPBool*>(value);
790 *supports_model = TRUE; 790 *supports_model = TRUE;
791 rv = NPERR_NO_ERROR; 791 rv = NPERR_NO_ERROR;
792 break; 792 break;
793 } 793 }
794 case NPNVsupportsCoreAnimationBool: { 794 case NPNVsupportsCoreAnimationBool: {
795 // We only support the Core Animation model on 10.6 and higher 795 // We only support the Core Animation model on 10.6 and higher
796 NPBool* supports_model = reinterpret_cast<NPBool*>(value); 796 NPBool* supports_model = reinterpret_cast<NPBool*>(value);
797 // Our Core Animation support currently doesn't handle QuickTime correctly 797 *supports_model = SupportsSharingAcceleratedSurfaces() ? TRUE : FALSE;
798 // (see <http://crbug.com/38336>), so for now we don't allow QuickTime to
799 // negotiate that model.
800 scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
801 if (plugin &&
802 plugin->plugin_lib()->plugin_info().name.find(L"QuickTime") !=
803 std::wstring::npos)
804 *supports_model = FALSE;
805 else
806 *supports_model = SupportsSharingAcceleratedSurfaces() ? TRUE : FALSE;
807 rv = NPERR_NO_ERROR; 798 rv = NPERR_NO_ERROR;
808 break; 799 break;
809 } 800 }
810 case NPNVsupportsOpenGLBool: { 801 case NPNVsupportsOpenGLBool: {
811 // This drawing model was never widely supported, and we don't plan to 802 // This drawing model was never widely supported, and we don't plan to
812 // support it. 803 // support it.
813 NPBool* supports_model = reinterpret_cast<NPBool*>(value); 804 NPBool* supports_model = reinterpret_cast<NPBool*>(value);
814 *supports_model = FALSE; 805 *supports_model = FALSE;
815 rv = NPERR_NO_ERROR; 806 rv = NPERR_NO_ERROR;
816 break; 807 break;
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
1079 scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id); 1070 scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
1080 if (plugin.get()) { 1071 if (plugin.get()) {
1081 return plugin->ConvertPoint(sourceX, sourceY, sourceSpace, 1072 return plugin->ConvertPoint(sourceX, sourceY, sourceSpace,
1082 destX, destY, destSpace); 1073 destX, destY, destSpace);
1083 } 1074 }
1084 NOTREACHED(); 1075 NOTREACHED();
1085 return FALSE; 1076 return FALSE;
1086 } 1077 }
1087 1078
1088 } // extern "C" 1079 } // extern "C"
OLDNEW
« no previous file with comments | « no previous file | webkit/glue/plugins/webplugin_delegate_impl_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698