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

Unified Diff: gpu/blink/webgraphicscontext3d_impl.cc

Issue 1864723003: 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: errorcallback: . 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/blink/webgraphicscontext3d_impl.cc
diff --git a/gpu/blink/webgraphicscontext3d_impl.cc b/gpu/blink/webgraphicscontext3d_impl.cc
index 5a5cdbd1fcacc165bc1ea17a55f163ed3bb1c02b..6c24341a141e131f8a4bf214cabd05ff0ea728e6 100644
--- a/gpu/blink/webgraphicscontext3d_impl.cc
+++ b/gpu/blink/webgraphicscontext3d_impl.cc
@@ -26,27 +26,6 @@
namespace gpu_blink {
-class WebGraphicsContext3DErrorMessageCallback
- : public ::gpu::gles2::GLES2ImplementationErrorMessageCallback {
- public:
- WebGraphicsContext3DErrorMessageCallback(
- WebGraphicsContext3DImpl* context)
- : graphics_context_(context) {
- }
-
- void OnErrorMessage(const char* msg, int id) override;
-
- private:
- WebGraphicsContext3DImpl* graphics_context_;
-
- DISALLOW_COPY_AND_ASSIGN(WebGraphicsContext3DErrorMessageCallback);
-};
-
-void WebGraphicsContext3DErrorMessageCallback::OnErrorMessage(
- const char* msg, int id) {
- graphics_context_->OnErrorMessage(msg, id);
-}
-
WebGraphicsContext3DImpl::WebGraphicsContext3DImpl()
: initialized_(false),
initialize_failed_(false),
@@ -68,19 +47,9 @@ void WebGraphicsContext3DImpl::setContextLostCallback(
context_lost_callback_ = cb;
}
-::gpu::gles2::GLES2ImplementationErrorMessageCallback*
- WebGraphicsContext3DImpl::getErrorMessageCallback() {
- if (!client_error_message_callback_) {
- client_error_message_callback_.reset(
- new WebGraphicsContext3DErrorMessageCallback(this));
- }
- return client_error_message_callback_.get();
-}
-
-void WebGraphicsContext3DImpl::OnErrorMessage(
- const std::string& message, int id) {
+void WebGraphicsContext3DImpl::OnErrorMessage(const char* message, int id) {
if (error_message_callback_) {
- blink::WebString str = blink::WebString::fromUTF8(message.c_str());
+ blink::WebString str = blink::WebString::fromUTF8(message);
error_message_callback_->onErrorMessage(str, id);
}
}

Powered by Google App Engine
This is Rietveld 408576698