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

Unified Diff: content/common/child_process_host_impl.cc

Issue 701033005: content: Move type selection logic out of GpuMemoryBufferImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove blank line and add missing CONTENT_EXPORT 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/child_process_host_impl.cc
diff --git a/content/common/child_process_host_impl.cc b/content/common/child_process_host_impl.cc
index 8e1f56f694f2983140c40eefa89d37ebd8a40f71..5c8cdb66be3ed2ffd67258daaeb63b5114793f5e 100644
--- a/content/common/child_process_host_impl.cc
+++ b/content/common/child_process_host_impl.cc
@@ -320,16 +320,9 @@ void ChildProcessHostImpl::OnAllocateGpuMemoryBuffer(
gfx::GpuMemoryBuffer::Format format,
gfx::GpuMemoryBuffer::Usage usage,
IPC::Message* reply) {
- base::CheckedNumeric<int> size = width;
- size *= height;
- if (!size.IsValid()) {
piman 2014/11/11 22:38:30 Why removing this?
reveman 2014/11/12 05:09:20 This check is now done by GpuMemoryBufferImplShare
piman 2014/11/14 03:59:44 Ok, can you add a comment? It's generally good to
reveman 2014/11/17 02:26:53 Done.
- GpuMemoryBufferAllocated(reply, gfx::GpuMemoryBufferHandle());
- return;
- }
-
// TODO(reveman): Add support for other types of GpuMemoryBuffers.
- if (!GpuMemoryBufferImplSharedMemory::IsConfigurationSupported(
- gfx::Size(width, height), format, usage)) {
+ if (!GpuMemoryBufferImplSharedMemory::IsFormatSupported(format) ||
+ !GpuMemoryBufferImplSharedMemory::IsUsageSupported(usage)) {
GpuMemoryBufferAllocated(reply, gfx::GpuMemoryBufferHandle());
return;
}

Powered by Google App Engine
This is Rietveld 408576698