Convert plugin and GPU process to brokered handle duplication.

BUG=119250
Review URL: https://chromiumcodereview.appspot.com/9958034

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132303 0039d316-1c4b-4281-b951-d872f2087c98
void WebPluginDelegateProxy::UpdateFrontBuffer(
    const gfx::Rect& rect,
    bool allow_buffer_flipping) {
  if (!front_buffer_canvas()) {
    return;
  }

#if defined(OS_WIN)
  if (UseSynchronousGeometryUpdates()) {
    allow_buffer_flipping = false;
  }
#endif

  front_buffer_diff_ = front_buffer_diff_.Subtract(rect);
  if (allow_buffer_flipping && front_buffer_diff_.IsEmpty()) {
    front_buffer_index_ = back_buffer_index();
    SendUpdateGeometry(false);
    front_buffer_diff_ = rect;
  } else {
    CopyFromBackBufferToFrontBuffer(rect);
  }
  transport_store_painted_ = transport_store_painted_.Union(rect);
}

void WebPluginDelegateProxy::UpdateFrontBuffer(
    const gfx::Rect& rect,
    bool allow_buffer_flipping) {
  if (!front_buffer_canvas()) {
    return;
  }

#if defined(OS_WIN)
  if (UseSynchronousGeometryUpdates()) {
    allow_buffer_flipping = false;
  }
#endif

  front_buffer_diff_ = front_buffer_diff_.Subtract(rect);
  if (allow_buffer_flipping && front_buffer_diff_.IsEmpty()) {
    front_buffer_index_ = back_buffer_index();
    SendUpdateGeometry(false);
    front_buffer_diff_ = rect;
  } else {
    CopyFromBackBufferToFrontBuffer(rect);
  }
  transport_store_painted_ = transport_store_painted_.Union(rect);
}
