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

Side by Side Diff: ppapi/proxy/ppapi_command_buffer_proxy.cc

Issue 10387182: Browser Plugin: PpapiCommandBufferProxy should see a lost context if the embedder has deleted the P… (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ppapi/proxy/ppapi_command_buffer_proxy.h" 5 #include "ppapi/proxy/ppapi_command_buffer_proxy.h"
6 6
7 #include "ppapi/proxy/ppapi_messages.h" 7 #include "ppapi/proxy/ppapi_messages.h"
8 #include "ppapi/proxy/proxy_channel.h" 8 #include "ppapi/proxy/proxy_channel.h"
9 #include "ppapi/shared_impl/api_id.h" 9 #include "ppapi/shared_impl/api_id.h"
10 #include "ppapi/shared_impl/host_resource.h" 10 #include "ppapi/shared_impl/host_resource.h"
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 return true; 255 return true;
256 256
257 last_state_.error = gpu::error::kLostContext; 257 last_state_.error = gpu::error::kLostContext;
258 return false; 258 return false;
259 } 259 }
260 260
261 void PpapiCommandBufferProxy::UpdateState( 261 void PpapiCommandBufferProxy::UpdateState(
262 const gpu::CommandBuffer::State& state) { 262 const gpu::CommandBuffer::State& state) {
263 // Handle wraparound. It works as long as we don't have more than 2B state 263 // Handle wraparound. It works as long as we don't have more than 2B state
264 // updates in flight across which reordering occurs. 264 // updates in flight across which reordering occurs.
265 if (state.generation - last_state_.generation < 0x80000000U) 265 if (state.error != gpu::error::kNoError ||
piman 2012/05/18 02:42:46 See comments in the other files, I'd rather the Pp
Fady Samuel 2012/05/18 19:27:48 Done.
266 state.generation - last_state_.generation < 0x80000000U)
266 last_state_ = state; 267 last_state_ = state;
267 } 268 }
268 269
269 } // namespace proxy 270 } // namespace proxy
270 } // namespace ppapi 271 } // namespace ppapi
271 272
OLDNEW
« no previous file with comments | « no previous file | ppapi/proxy/ppb_graphics_3d_proxy.cc » ('j') | ppapi/proxy/ppb_graphics_3d_proxy.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698