Index: content/renderer/pepper/ppb_graphics_3d_impl.h |
diff --git a/content/renderer/pepper/ppb_graphics_3d_impl.h b/content/renderer/pepper/ppb_graphics_3d_impl.h |
index 6dd34624f76fca7309570a1f3d25ab6335fa95c0..57ac15b6d0829bb15c39d5f87b43cef4a0642d9d 100644 |
--- a/content/renderer/pepper/ppb_graphics_3d_impl.h |
+++ b/content/renderer/pepper/ppb_graphics_3d_impl.h |
@@ -10,6 +10,7 @@ |
#include "base/macros.h" |
#include "base/memory/shared_memory.h" |
#include "base/memory/weak_ptr.h" |
+#include "gpu/command_buffer/client/gpu_control_client.h" |
#include "gpu/command_buffer/common/command_buffer_id.h" |
#include "gpu/command_buffer/common/mailbox.h" |
#include "gpu/command_buffer/common/sync_token.h" |
@@ -24,7 +25,8 @@ class GpuChannelHost; |
namespace content { |
-class PPB_Graphics3D_Impl : public ppapi::PPB_Graphics3D_Shared { |
+class PPB_Graphics3D_Impl : public ppapi::PPB_Graphics3D_Shared, |
+ public gpu::GpuControlClient { |
public: |
static PP_Resource CreateRaw(PP_Instance instance, |
PP_Resource share_context, |
@@ -81,10 +83,12 @@ class PPB_Graphics3D_Impl : public ppapi::PPB_Graphics3D_Shared { |
base::SharedMemoryHandle* shared_state_handle, |
gpu::CommandBufferId* command_buffer_id); |
- // Notifications received from the GPU process. |
+ // GpuControlClient implementation. |
+ void OnGpuControlLostContext() final; |
+ void OnGpuControlErrorMessage(const char* msg, int id) final; |
+ |
+ // Other notifications from the GPU process. |
void OnSwapBuffers(); |
- void OnContextLost(); |
- void OnConsoleMessage(const std::string& msg, int id); |
// Notifications sent to plugin. |
void SendContextLost(); |
@@ -93,6 +97,10 @@ class PPB_Graphics3D_Impl : public ppapi::PPB_Graphics3D_Shared { |
// True when waiting for compositor to commit our backing texture. |
bool commit_pending_; |
+#if DCHECK_IS_ON() |
+ bool lost_context_ = false; |
+#endif |
+ |
gpu::Mailbox mailbox_; |
gpu::SyncToken sync_token_; |
bool has_alpha_; |