Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2686)

Unified Diff: content/renderer/pepper/pepper_video_encoder_host.cc

Issue 1885903002: Revert of Make lost context and error message callbacks on GpuControl go to client (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/pepper/pepper_video_encoder_host.h ('k') | content/renderer/pepper/ppb_graphics_3d_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/pepper/pepper_video_encoder_host.cc
diff --git a/content/renderer/pepper/pepper_video_encoder_host.cc b/content/renderer/pepper/pepper_video_encoder_host.cc
index e1a6080093531d6eddcd4cbd4777487a6fc49a19..afdc33d63f73e5e3cca786ab76ce18a2c5303ea5 100644
--- a/content/renderer/pepper/pepper_video_encoder_host.cc
+++ b/content/renderer/pepper/pepper_video_encoder_host.cc
@@ -232,15 +232,6 @@
return PP_ERROR_FAILED;
}
-void PepperVideoEncoderHost::OnGpuControlLostContext() {
-#if DCHECK_IS_ON()
- // This should never occur more than once.
- DCHECK(!lost_context_);
- lost_context_ = true;
-#endif
- NotifyPepperError(PP_ERROR_RESOURCE_FAILED);
-}
-
int32_t PepperVideoEncoderHost::OnHostMsgGetSupportedProfiles(
ppapi::host::HostMessageContext* context) {
std::vector<PP_VideoProfileDescription> pp_profiles;
@@ -528,8 +519,9 @@
return false;
}
- command_buffer_->SetGpuControlClient(this);
-
+ command_buffer_->SetContextLostCallback(media::BindToCurrentLoop(
+ base::Bind(&PepperVideoEncoderHost::NotifyPepperError,
+ weak_ptr_factory_.GetWeakPtr(), PP_ERROR_RESOURCE_FAILED)));
if (!command_buffer_->Initialize()) {
Close();
return false;
« no previous file with comments | « content/renderer/pepper/pepper_video_encoder_host.h ('k') | content/renderer/pepper/ppb_graphics_3d_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698