Bug 751602: Compile fixes for NPAPI drawing models. r=bas

This commit is contained in:
Josh Aas 2012-05-04 22:36:27 -04:00
parent b9b53a7a22
commit 82183f2457
2 changed files with 13 additions and 5 deletions

View File

@ -69,12 +69,14 @@ class nsIOutputStream;
const NPDrawingModel kDefaultDrawingModel = NPDrawingModelSyncWin;
#elif defined(MOZ_X11)
const NPDrawingModel kDefaultDrawingModel = NPDrawingModelSyncX;
#else
#elif defined(XP_MACOSX)
#ifndef NP_NO_QUICKDRAW
const NPDrawingModel kDefaultDrawingModel = NPDrawingModelQuickDraw;
#else
const NPDrawingModel kDefaultDrawingModel = NPDrawingModelCoreGraphics;
#endif
#else
const NPDrawingModel kDefaultDrawingModel = static_cast<NPDrawingModel>(0);
#endif
class nsNPAPITimer

View File

@ -421,15 +421,21 @@ PluginInstanceParent::AnswerNPN_SetValue_NPPVpluginDrawingModel(
mNotifySink = new NotificationSink(this);
container->SetCompositionNotifySink(mNotifySink);
} else if (drawingModel == NPDrawingModelSyncWin ||
#ifdef XP_MACOSX
} else if (
#if defined(XP_WIN)
drawingModel == NPDrawingModelSyncWin
#elif defined(XP_MACOSX)
#ifndef NP_NO_QUICKDRAW
drawingModel == NPDrawingModelQuickDraw ||
#endif
drawingModel == NPDrawingModelOpenGL ||
drawingModel == NPDrawingModelCoreGraphics ||
drawingModel == NPDrawingModelCoreGraphics
#elif defined(MOZ_X11)
drawingModel == NPDrawingModelSyncX
#else
false
#endif
drawingModel == NPDrawingModelSyncX) {
) {
*shmem = null_t();
ImageContainer *container = GetImageContainer();