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

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

Issue 1907783002: Delete //gpu/blink/ and WebGraphicsContext3DImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rm-webgraphicscontext3dimpl: noflush 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: 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 f649a21cca9b66d7db5d25e73a99495c13641e5c..332f014b0b4eda7a4f01e6e49fc5fe7f7a12650c 100644
--- a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h
+++ b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h
@@ -18,7 +18,6 @@
#include "base/synchronization/lock.h"
#include "content/common/content_export.h"
#include "content/common/gpu/client/command_buffer_metrics.h"
-#include "gpu/blink/webgraphicscontext3d_impl.h"
#include "gpu/command_buffer/common/gles2_cmd_utils.h"
#include "gpu/ipc/client/command_buffer_proxy_impl.h"
#include "gpu/ipc/common/surface_handle.h"
@@ -49,7 +48,7 @@ const size_t kDefaultMinTransferBufferSize = 1 * 256 * 1024;
const size_t kDefaultMaxTransferBufferSize = 16 * 1024 * 1024;
class WebGraphicsContext3DCommandBufferImpl
- : public gpu_blink::WebGraphicsContext3DImpl {
+ : public NON_EXPORTED_BASE(blink::WebGraphicsContext3D) {
public:
enum MappedMemoryReclaimLimit {
kNoLimit = 0,
@@ -99,6 +98,14 @@ class WebGraphicsContext3DCommandBufferImpl
DISALLOW_COPY_AND_ASSIGN(ShareGroup);
};
+ class WebGraphicsContextLostCallback {
+ public:
+ virtual void onContextLost() = 0;
+
+ protected:
+ virtual ~WebGraphicsContextLostCallback() {}
+ };
+
CONTENT_EXPORT WebGraphicsContext3DCommandBufferImpl(
gpu::SurfaceHandle surface_handle,
const GURL& active_url,
@@ -121,6 +128,10 @@ class WebGraphicsContext3DCommandBufferImpl
return real_gl_.get();
}
+ void SetContextLostCallback(WebGraphicsContextLostCallback* callback) {
+ context_lost_callback_ = callback;
+ }
+
CONTENT_EXPORT bool InitializeOnCurrentThread(
const gpu::SharedMemoryLimits& memory_limits);
@@ -163,6 +174,10 @@ class WebGraphicsContext3DCommandBufferImpl
void OnContextLost();
+ bool initialized_ = false;
+ bool initialize_failed_ = false;
+ WebGraphicsContextLostCallback* context_lost_callback_ = nullptr;
+
bool automatic_flushes_;
gpu::gles2::ContextCreationAttribHelper attributes_;

Powered by Google App Engine
This is Rietveld 408576698