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

Side by Side Diff: content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.cc

Issue 948323002: Revert of Add support for compressed GPU memory buffers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.h" 5 #include "content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/numerics/safe_math.h" 8 #include "base/numerics/safe_math.h"
9 #include "ui/gl/gl_bindings.h" 9 #include "ui/gl/gl_bindings.h"
10 10
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 handle.id, 108 handle.id,
109 size, 109 size,
110 format, 110 format,
111 callback, 111 callback,
112 shared_memory.Pass())); 112 shared_memory.Pass()));
113 } 113 }
114 114
115 // static 115 // static
116 bool GpuMemoryBufferImplSharedMemory::IsFormatSupported(Format format) { 116 bool GpuMemoryBufferImplSharedMemory::IsFormatSupported(Format format) {
117 switch (format) { 117 switch (format) {
118 case ATC:
119 case ATCIA:
120 case DXT1:
121 case DXT5:
122 case ETC1:
123 case RGBA_8888: 118 case RGBA_8888:
124 case BGRA_8888: 119 case BGRA_8888:
125 return true; 120 return true;
126 case RGBX_8888: 121 case RGBX_8888:
127 return false; 122 return false;
128 } 123 }
129 124
130 NOTREACHED(); 125 NOTREACHED();
131 return false; 126 return false;
132 } 127 }
(...skipping 18 matching lines...) Expand all
151 146
152 gfx::GpuMemoryBufferHandle GpuMemoryBufferImplSharedMemory::GetHandle() const { 147 gfx::GpuMemoryBufferHandle GpuMemoryBufferImplSharedMemory::GetHandle() const {
153 gfx::GpuMemoryBufferHandle handle; 148 gfx::GpuMemoryBufferHandle handle;
154 handle.type = gfx::SHARED_MEMORY_BUFFER; 149 handle.type = gfx::SHARED_MEMORY_BUFFER;
155 handle.id = id_; 150 handle.id = id_;
156 handle.handle = shared_memory_->handle(); 151 handle.handle = shared_memory_->handle();
157 return handle; 152 return handle;
158 } 153 }
159 154
160 } // namespace content 155 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698