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

Side by Side Diff: content/renderer/pepper/pepper_video_encoder_host.cc

Issue 1916303003: Report lost context from GLES2Implementation based on share group state. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: lost-share-group: disconnect-channel Created 4 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/pepper/pepper_video_encoder_host.h" 5 #include "content/renderer/pepper/pepper_video_encoder_host.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/memory/shared_memory.h" 10 #include "base/memory/shared_memory.h"
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 235
236 void PepperVideoEncoderHost::OnGpuControlLostContext() { 236 void PepperVideoEncoderHost::OnGpuControlLostContext() {
237 #if DCHECK_IS_ON() 237 #if DCHECK_IS_ON()
238 // This should never occur more than once. 238 // This should never occur more than once.
239 DCHECK(!lost_context_); 239 DCHECK(!lost_context_);
240 lost_context_ = true; 240 lost_context_ = true;
241 #endif 241 #endif
242 NotifyPepperError(PP_ERROR_RESOURCE_FAILED); 242 NotifyPepperError(PP_ERROR_RESOURCE_FAILED);
243 } 243 }
244 244
245 void PepperVideoEncoderHost::OnGpuControlLostContextMaybeReentrant() {
246 // No internal state to update on lost context.
247 }
248
245 int32_t PepperVideoEncoderHost::OnHostMsgGetSupportedProfiles( 249 int32_t PepperVideoEncoderHost::OnHostMsgGetSupportedProfiles(
246 ppapi::host::HostMessageContext* context) { 250 ppapi::host::HostMessageContext* context) {
247 std::vector<PP_VideoProfileDescription> pp_profiles; 251 std::vector<PP_VideoProfileDescription> pp_profiles;
248 GetSupportedProfiles(&pp_profiles); 252 GetSupportedProfiles(&pp_profiles);
249 253
250 host()->SendReply( 254 host()->SendReply(
251 context->MakeReplyMessageContext(), 255 context->MakeReplyMessageContext(),
252 PpapiPluginMsg_VideoEncoder_GetSupportedProfilesReply(pp_profiles)); 256 PpapiPluginMsg_VideoEncoder_GetSupportedProfilesReply(pp_profiles));
253 257
254 return PP_OK_COMPLETIONPENDING; 258 return PP_OK_COMPLETIONPENDING;
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
675 } 679 }
676 680
677 uint8_t* PepperVideoEncoderHost::ShmHandleToAddress(int32_t buffer_id) { 681 uint8_t* PepperVideoEncoderHost::ShmHandleToAddress(int32_t buffer_id) {
678 DCHECK(RenderThreadImpl::current()); 682 DCHECK(RenderThreadImpl::current());
679 DCHECK_GE(buffer_id, 0); 683 DCHECK_GE(buffer_id, 0);
680 DCHECK_LT(buffer_id, static_cast<int32_t>(shm_buffers_.size())); 684 DCHECK_LT(buffer_id, static_cast<int32_t>(shm_buffers_.size()));
681 return static_cast<uint8_t*>(shm_buffers_[buffer_id]->shm->memory()); 685 return static_cast<uint8_t*>(shm_buffers_[buffer_id]->shm->memory());
682 } 686 }
683 687
684 } // namespace content 688 } // namespace content
OLDNEW
« 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