diff options
Diffstat (limited to 'chromium/ppapi/proxy/graphics_2d_resource.cc')
-rw-r--r-- | chromium/ppapi/proxy/graphics_2d_resource.cc | 27 |
1 files changed, 5 insertions, 22 deletions
diff --git a/chromium/ppapi/proxy/graphics_2d_resource.cc b/chromium/ppapi/proxy/graphics_2d_resource.cc index f545364f1e7..ea8a9c52ce4 100644 --- a/chromium/ppapi/proxy/graphics_2d_resource.cc +++ b/chromium/ppapi/proxy/graphics_2d_resource.cc @@ -103,7 +103,7 @@ void Graphics2DResource::ReplaceContents(PP_Resource image_data) { PP_Bool Graphics2DResource::SetScale(float scale) { if (scale <= 0.0f) return PP_FALSE; - Post(RENDERER, PpapiHostMsg_Graphics2D_Dev_SetScale(scale)); + Post(RENDERER, PpapiHostMsg_Graphics2D_SetScale(scale)); scale_ = scale; return PP_TRUE; } @@ -112,15 +112,6 @@ float Graphics2DResource::GetScale() { return scale_; } -void Graphics2DResource::SetOffset(const PP_Point* offset) { - Post(RENDERER, PpapiHostMsg_Graphics2D_SetOffset(*offset)); -} - -void Graphics2DResource::SetResizeMode( - PP_Graphics2D_Dev_ResizeMode resize_mode) { - Post(RENDERER, PpapiHostMsg_Graphics2D_SetResizeMode(resize_mode)); -} - int32_t Graphics2DResource::Flush(scoped_refptr<TrackedCallback> callback) { // If host is not even created, return failure immediately. This can happen // when failed to initialize (in constructor). @@ -131,20 +122,12 @@ int32_t Graphics2DResource::Flush(scoped_refptr<TrackedCallback> callback) { return PP_ERROR_INPROGRESS; // Can't have >1 flush pending. current_flush_callback_ = callback; - // Send the current view data with the Flush() message. This allows the - // renderer to know what the plugin's view of the renderer is at the time - // Flush was called. - PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance( - pp_instance()); - ppapi::ViewData view_data; - if (dispatcher) { - InstanceData* data = dispatcher->GetInstanceData(pp_instance()); - if (data) - view_data = data->view; - } + std::vector<ui::LatencyInfo> latency_info; + PpapiGlobals::Get()->TransferLatencyInfoTo(&latency_info, pp_instance()); + Call<PpapiPluginMsg_Graphics2D_FlushAck>( RENDERER, - PpapiHostMsg_Graphics2D_Flush(view_data), + PpapiHostMsg_Graphics2D_Flush(latency_info), base::Bind(&Graphics2DResource::OnPluginMsgFlushACK, this)); return PP_OK_COMPLETIONPENDING; } |