diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-07 05:33:20 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-07 05:33:20 +0000 |
commit | 7ca87c2179917c73feae2f6183d2536dd6690623 (patch) | |
tree | e4bf36cdd3bb3045f82d1d921f760d70b7dc73d5 /remoting | |
parent | 187c54919b3af4cd6dec23d9ea3c1547417fe7be (diff) | |
download | chromium_src-7ca87c2179917c73feae2f6183d2536dd6690623.zip chromium_src-7ca87c2179917c73feae2f6183d2536dd6690623.tar.gz chromium_src-7ca87c2179917c73feae2f6183d2536dd6690623.tar.bz2 |
Add an instance parameter to var objects, audio, and the 2D API. This replaces the module in most cases.
This will be used in the proxy to multiplex one plugin across multiple renderer processes. We need the instance in the proxy to know which process to send it to.
I added a deprecated var object creation function for native client, which
depends on the module and this is very difficult to change. Because it doesn't
have the multiplexing requirements, this is fine for now.
TEST=ppapi ui tests
BUG=none
Review URL: http://codereview.chromium.org/6085009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70721 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
-rw-r--r-- | remoting/client/plugin/chromoting_instance.cc | 2 | ||||
-rw-r--r-- | remoting/client/plugin/pepper_view.cc | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/remoting/client/plugin/chromoting_instance.cc b/remoting/client/plugin/chromoting_instance.cc index 82eeed4..b11dae7 100644 --- a/remoting/client/plugin/chromoting_instance.cc +++ b/remoting/client/plugin/chromoting_instance.cc @@ -183,7 +183,7 @@ pp::Var ChromotingInstance::GetInstanceObject() { object->Init(); // The pp::Var takes ownership of object here. - instance_object_ = pp::Var(object); + instance_object_ = pp::Var(this, object); } return instance_object_; diff --git a/remoting/client/plugin/pepper_view.cc b/remoting/client/plugin/pepper_view.cc index 26d128b..a02ffed 100644 --- a/remoting/client/plugin/pepper_view.cc +++ b/remoting/client/plugin/pepper_view.cc @@ -48,7 +48,7 @@ void PepperView::Paint() { // is wrong. if (is_static_fill_) { LOG(ERROR) << "Static filling " << static_fill_color_; - pp::ImageData image(pp::ImageData::GetNativeImageDataFormat(), + pp::ImageData image(instance_, pp::ImageData::GetNativeImageDataFormat(), pp::Size(viewport_width_, viewport_height_), false); if (image.is_null()) { @@ -82,7 +82,7 @@ void PepperView::PaintFrame(media::VideoFrame* frame, UpdatedRects* rects) { TraceContext::tracer()->PrintString("Start Paint Frame."); // TODO(ajwong): We're assuming the native format is BGRA_PREMUL below. This // is wrong. - pp::ImageData image(pp::ImageData::GetNativeImageDataFormat(), + pp::ImageData image(instance_, pp::ImageData::GetNativeImageDataFormat(), pp::Size(viewport_width_, viewport_height_), false); if (image.is_null()) { @@ -181,7 +181,8 @@ void PepperView::SetViewport(int x, int y, int width, int height) { viewport_width_ = width; viewport_height_ = height; - graphics2d_ = pp::Graphics2D(pp::Size(viewport_width_, viewport_height_), + graphics2d_ = pp::Graphics2D(instance_, + pp::Size(viewport_width_, viewport_height_), false); if (!instance_->BindGraphics(graphics2d_)) { LOG(ERROR) << "Couldn't bind the device context."; |