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

Unified Diff: gpu/command_buffer/client/gles2_implementation.h

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
Index: gpu/command_buffer/client/gles2_implementation.h
diff --git a/gpu/command_buffer/client/gles2_implementation.h b/gpu/command_buffer/client/gles2_implementation.h
index 5e73c4da6c7ab1afdc1c43c6b99e306b5592095b..6ee901e2a05cb73a8f56c3556d51403e7ece9349 100644
--- a/gpu/command_buffer/client/gles2_implementation.h
+++ b/gpu/command_buffer/client/gles2_implementation.h
@@ -26,7 +26,6 @@
#include "gpu/command_buffer/client/context_support.h"
#include "gpu/command_buffer/client/gles2_impl_export.h"
#include "gpu/command_buffer/client/gles2_interface.h"
-#include "gpu/command_buffer/client/gpu_control_client.h"
#include "gpu/command_buffer/client/mapped_memory.h"
#include "gpu/command_buffer/client/ref_counted.h"
#include "gpu/command_buffer/client/share_group.h"
@@ -112,6 +111,12 @@
class VertexArrayObjectManager;
class QueryTracker;
+class GLES2ImplementationErrorMessageCallback {
+ public:
+ virtual ~GLES2ImplementationErrorMessageCallback() { }
+ virtual void OnErrorMessage(const char* msg, int id) = 0;
+};
+
// This class emulates GLES2 over command buffers. It can be used by a client
// program so that the program does not need deal with shared memory and command
// buffer management. See gl2_lib.h. Note that there is a performance gain to
@@ -121,7 +126,6 @@
class GLES2_IMPL_EXPORT GLES2Implementation
: NON_EXPORTED_BASE(public GLES2Interface),
NON_EXPORTED_BASE(public ContextSupport),
- NON_EXPORTED_BASE(public GpuControlClient),
NON_EXPORTED_BASE(public base::trace_event::MemoryDumpProvider) {
public:
enum MappedMemoryLimit {
@@ -208,10 +212,6 @@
const gfx::Rect& display_bounds,
const gfx::RectF& uv_rect) override;
uint64_t ShareGroupTracingGUID() const override;
-
- void SetErrorMessageCallback(
- const base::Callback<void(const char*, int32_t)>& callback);
- void SetLostContextCallback(const base::Closure& callback);
void GetProgramInfoCHROMIUMHelper(GLuint program,
std::vector<int8_t>* result);
@@ -264,6 +264,11 @@
bool OnMemoryDump(const base::trace_event::MemoryDumpArgs& args,
base::trace_event::ProcessMemoryDump* pmd) override;
+ void SetErrorMessageCallback(
+ GLES2ImplementationErrorMessageCallback* callback) {
+ error_message_callback_ = callback;
+ }
+
ShareGroup* share_group() const {
return share_group_.get();
}
@@ -412,10 +417,6 @@
T GetResultAs() {
return static_cast<T>(GetResultBuffer());
}
-
- // GpuControlClient implementation.
- void OnGpuControlLostContext() final;
- void OnGpuControlErrorMessage(const char* message, int32_t id) final;
void* GetResultBuffer();
int32_t GetResultShmId();
@@ -824,11 +825,7 @@
scoped_ptr<BufferTracker> buffer_tracker_;
- base::Callback<void(const char*, int32_t)> error_message_callback_;
- base::Closure lost_context_callback_;
-#if DCHECK_IS_ON()
- bool lost_context_ = false;
-#endif
+ GLES2ImplementationErrorMessageCallback* error_message_callback_;
int current_trace_stack_;
« no previous file with comments | « gpu/command_buffer/client/gl_in_process_context.cc ('k') | gpu/command_buffer/client/gles2_implementation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698