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

Unified Diff: content/common/gpu/gpu_memory_buffer_factory_shared_memory.h

Issue 1189943002: content: Fix lost context handling when using native GpuMemoryBuffers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: retry logic and remove singleton Created 5 years, 6 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/gpu_memory_buffer_factory_shared_memory.h
diff --git a/content/common/gpu/gpu_memory_buffer_factory_shared_memory.h b/content/common/gpu/gpu_memory_buffer_factory_shared_memory.h
index b2a9c705f88726febee5e13973989de52f726775..1384b7a27e73470e4bfcebcdaef8aac826b5c34e 100644
--- a/content/common/gpu/gpu_memory_buffer_factory_shared_memory.h
+++ b/content/common/gpu/gpu_memory_buffer_factory_shared_memory.h
@@ -11,6 +11,10 @@
#include "ui/gfx/geometry/size.h"
#include "ui/gfx/gpu_memory_buffer.h"
+#if DCHECK_IS_ON()
+#include <set>
+#endif
+
namespace gfx {
class GLImage;
}
@@ -23,6 +27,10 @@ class GpuMemoryBufferFactorySharedMemory : public GpuMemoryBufferFactory,
GpuMemoryBufferFactorySharedMemory();
~GpuMemoryBufferFactorySharedMemory() override;
+ static bool IsGpuMemoryBufferConfigurationSupported(
+ gfx::GpuMemoryBuffer::Format format,
+ gfx::GpuMemoryBuffer::Usage usage);
+
// Overridden from GpuMemoryBufferFactory:
void GetSupportedGpuMemoryBufferConfigurations(
std::vector<Configuration>* configurations) override;
@@ -46,6 +54,10 @@ class GpuMemoryBufferFactorySharedMemory : public GpuMemoryBufferFactory,
int client_id) override;
private:
+#if DCHECK_IS_ON()
+ std::set<gfx::GpuMemoryBufferId> buffers_;
+#endif
+
DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferFactorySharedMemory);
};

Powered by Google App Engine
This is Rietveld 408576698