Bug 787513 - Give the proper update rectangle for NPAPI for CoreGraphics plugins on mac. r=smichaud
authorBenoit Girard <b56girard@gmail.com>
Fri, 04 Jan 2013 12:49:36 -0500
changeset 117619 2b5844e951d2e2b340511f27c8a155056f5d4137
parent 117618 c908514142927a47dd6cf904905076553cf9c7e1
child 117620 220a958dd8e311cfb428db1c81192006778dbffa
push id20605
push userb56girard@gmail.com
push dateFri, 04 Jan 2013 17:50:00 +0000
treeherdermozilla-inbound@2b5844e951d2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmichaud
bugs787513
milestone20.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 787513 - Give the proper update rectangle for NPAPI for CoreGraphics plugins on mac. r=smichaud
dom/plugins/ipc/PluginUtilsOSX.mm
--- a/dom/plugins/ipc/PluginUtilsOSX.mm
+++ b/dom/plugins/ipc/PluginUtilsOSX.mm
@@ -101,16 +101,18 @@ CGBitmapContextSetDataFunc CGBitmapConte
 }
 
 - (void)drawInContext:(CGContextRef)aCGContext
 {
   ::CGContextSaveGState(aCGContext); 
   ::CGContextTranslateCTM(aCGContext, 0, self.bounds.size.height);
   ::CGContextScaleCTM(aCGContext, (CGFloat) 1, (CGFloat) -1);
 
+  mUpdateRect = nsIntRect(0, 0, self.bounds.size.width, self.bounds.size.height);
+
   mDrawFunc(aCGContext, mPluginInstance, mUpdateRect);
 
   ::CGContextRestoreGState(aCGContext);
 
   if (mAvoidCGCrashes) {
     if (mLastCGContext) {
       ::CGContextRelease(mLastCGContext);
     }