 +  int pitch;
 +  void *buffer;
 +
-+  SDL_mutex* image_data_mutex;
++  SDL_mutex* flush_mutex;
++  SDL_cond* flush_cond;
 +  int ow, oh; // plugin output dimensions
++  // Whether context2d is being flushed to the device.
++  bool flush_pending;
++  // Whether image_data contains new data.
++  bool data_ready;
 +  pp::ImageData* image_data;
 +  pp::Graphics2D* context2d;  // The PINPAPI 2D drawing context.
 +};

+  }
+  delete _this->hidden->context2d;
+  delete _this->hidden->image_data;
+}
+} // extern "C"
diff --git SDL-1.2.14/src/video/nacl/SDL_naclvideo.h SDL-1.2.14/src/video/nacl/SDL_naclvideo.h
new file mode 100644
index 0000000..09480c8
--- /dev/null
+++ SDL-1.2.14/src/video/nacl/SDL_naclvideo.h
@@ -0,0 +1,33 @@
+#include "SDL_config.h"
+
+#ifndef _SDL_naclvideo_h

+extern void NACL_PumpEvents(_THIS);
diff --git SDL-1.2.14/src/video/nacl/SDL_naclvideo.cc SDL-1.2.14/src/video/nacl/SDL_naclvideo.cc
new file mode 100644
index 0000000..2c9f6e5
--- /dev/null
+++ SDL-1.2.14/src/video/nacl/SDL_naclvideo.cc
@@ -0,0 +1,269 @@
+#include "SDL_config.h"
+
+#include <assert.h>
