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

Unified Diff: content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h

Issue 1095893002: gpu: Fix some context lost marking glitches+leaks and add UMA stats (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: kbr's comment Created 5 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
Index: content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h
diff --git a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h
index ea14d7f0312a36626c25a20a7f743ab6a6fdd08b..115e167dc565f80c14d9573bbcb23fb802256056 100644
--- a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h
+++ b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h
@@ -13,6 +13,7 @@
#include "base/memory/weak_ptr.h"
#include "base/synchronization/lock.h"
#include "content/common/content_export.h"
+#include "content/common/gpu/client/command_buffer_metrics.h"
#include "content/common/gpu/client/command_buffer_proxy_impl.h"
#include "gpu/blink/webgraphicscontext3d_impl.h"
#include "third_party/WebKit/public/platform/WebGraphicsContext3D.h"
@@ -150,6 +151,9 @@ class WebGraphicsContext3DCommandBufferImpl
virtual blink::WGC3Denum getGraphicsResetStatusARB();
+ void SetContextType(CommandBufferContextType type) {
+ context_type_ = type;
+ }
private:
// These are the same error codes as used by EGL.
enum Error {
@@ -184,7 +188,7 @@ class WebGraphicsContext3DCommandBufferImpl
// unnecessary complexity at the moment.
bool CreateContext(bool onscreen);
- virtual void OnGpuChannelLost();
+ virtual void OnContextLost();
bool lose_context_when_out_of_memory_;
blink::WebGraphicsContext3D::Attributes attributes_;
@@ -195,6 +199,7 @@ class WebGraphicsContext3DCommandBufferImpl
scoped_refptr<GpuChannelHost> host_;
int32 surface_id_;
GURL active_url_;
+ CommandBufferContextType context_type_;
gfx::GpuPreference gpu_preference_;

Powered by Google App Engine
This is Rietveld 408576698