summaryrefslogtreecommitdiffstats
path: root/webkit/plugins/ppapi/ppb_image_data_impl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/plugins/ppapi/ppb_image_data_impl.cc')
-rw-r--r--webkit/plugins/ppapi/ppb_image_data_impl.cc11
1 files changed, 4 insertions, 7 deletions
diff --git a/webkit/plugins/ppapi/ppb_image_data_impl.cc b/webkit/plugins/ppapi/ppb_image_data_impl.cc
index b961a66..042f38b 100644
--- a/webkit/plugins/ppapi/ppb_image_data_impl.cc
+++ b/webkit/plugins/ppapi/ppb_image_data_impl.cc
@@ -11,13 +11,11 @@
#include "base/scoped_ptr.h"
#include "skia/ext/platform_canvas.h"
#include "ppapi/c/pp_instance.h"
-#include "ppapi/c/pp_module.h"
#include "ppapi/c/pp_resource.h"
#include "ppapi/c/ppb_image_data.h"
#include "ppapi/c/trusted/ppb_image_data_trusted.h"
#include "third_party/skia/include/core/SkColorPriv.h"
#include "webkit/plugins/ppapi/common.h"
-#include "webkit/plugins/ppapi/plugin_module.h"
#include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
namespace webkit {
@@ -41,8 +39,7 @@ PP_Resource Create(PP_Instance instance_id,
if (!instance)
return 0;
- scoped_refptr<PPB_ImageData_Impl> data(
- new PPB_ImageData_Impl(instance->module()));
+ scoped_refptr<PPB_ImageData_Impl> data(new PPB_ImageData_Impl(instance));
if (!data->Init(format,
size->width,
size->height,
@@ -112,8 +109,8 @@ const PPB_ImageDataTrusted ppb_imagedata_trusted = {
} // namespace
-PPB_ImageData_Impl::PPB_ImageData_Impl(PluginModule* module)
- : Resource(module),
+PPB_ImageData_Impl::PPB_ImageData_Impl(PluginInstance* instance)
+ : Resource(instance),
format_(PP_IMAGEDATAFORMAT_BGRA_PREMUL),
width_(0),
height_(0) {
@@ -167,7 +164,7 @@ bool PPB_ImageData_Impl::Init(PP_ImageDataFormat format,
return false; // Prevent overflow of signed 32-bit ints.
platform_image_.reset(
- module()->GetSomeInstance()->delegate()->CreateImage2D(width, height));
+ instance()->delegate()->CreateImage2D(width, height));
format_ = format;
width_ = width;
height_ = height;