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

Unified Diff: content/common/gpu/client/gpu_memory_buffer_impl_ozone_native_buffer.cc

Issue 701033005: content: Move type selection logic out of GpuMemoryBufferImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address review feedback Created 6 years, 1 month 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/gpu_memory_buffer_impl_ozone_native_buffer.cc
diff --git a/content/common/gpu/client/gpu_memory_buffer_impl_ozone_native_buffer.cc b/content/common/gpu/client/gpu_memory_buffer_impl_ozone_native_buffer.cc
index 2fd143894b26f026c94128c0baaf692b7c305284..0747ceae7f69ce0246fa571dc33dffeecdeaf4a2 100644
--- a/content/common/gpu/client/gpu_memory_buffer_impl_ozone_native_buffer.cc
+++ b/content/common/gpu/client/gpu_memory_buffer_impl_ozone_native_buffer.cc
@@ -7,6 +7,7 @@
#include "base/bind.h"
#include "content/common/gpu/client/gpu_memory_buffer_factory_host.h"
#include "ui/gl/gl_bindings.h"
+#include "ui/ozone/public/surface_factory_ozone.h"
namespace content {
namespace {
@@ -135,20 +136,14 @@ bool GpuMemoryBufferImplOzoneNativeBuffer::IsUsageSupported(Usage usage) {
case MAP:
return false;
case SCANOUT:
- return true;
+ return ui::SurfaceFactoryOzone::GetInstance()->CanCreateNativePixmap(
+ ui::SurfaceFactoryOzone::SCANOUT);
}
NOTREACHED();
return false;
}
-// static
-bool GpuMemoryBufferImplOzoneNativeBuffer::IsConfigurationSupported(
- Format format,
- Usage usage) {
- return IsFormatSupported(format) && IsUsageSupported(usage);
-}
-
void* GpuMemoryBufferImplOzoneNativeBuffer::Map() {
NOTREACHED();
return NULL;

Powered by Google App Engine
This is Rietveld 408576698