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

Side by Side Diff: ui/gl/gl_image_memory.cc

Issue 1068663002: gpu: More specific internalformat requirements for CreateImageCHROMIUM. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « gpu/command_buffer/tests/gl_gpu_memory_buffer_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ui/gl/gl_image_memory.h" 5 #include "ui/gl/gl_image_memory.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/trace_event/trace_event.h" 8 #include "base/trace_event/trace_event.h"
9 #include "ui/gl/gl_bindings.h" 9 #include "ui/gl/gl_bindings.h"
10 #include "ui/gl/scoped_binders.h" 10 #include "ui/gl/scoped_binders.h"
11 11
12 #if defined(OS_WIN) || defined(USE_X11) || defined(OS_ANDROID) || \ 12 #if defined(OS_WIN) || defined(USE_X11) || defined(OS_ANDROID) || \
13 defined(USE_OZONE) 13 defined(USE_OZONE)
14 #include "ui/gl/gl_surface_egl.h" 14 #include "ui/gl/gl_surface_egl.h"
15 #endif 15 #endif
16 16
17 namespace gfx { 17 namespace gfx {
18 namespace { 18 namespace {
19 19
20 bool ValidInternalFormat(unsigned internalformat) { 20 bool ValidInternalFormat(unsigned internalformat) {
21 switch (internalformat) { 21 switch (internalformat) {
22 case GL_RGBA: 22 case GL_RGBA:
23 case GL_BGRA_EXT:
23 return true; 24 return true;
24 default: 25 default:
25 return false; 26 return false;
26 } 27 }
27 } 28 }
28 29
29 bool ValidFormat(gfx::GpuMemoryBuffer::Format format) { 30 bool ValidFormat(gfx::GpuMemoryBuffer::Format format) {
30 switch (format) { 31 switch (format) {
31 case gfx::GpuMemoryBuffer::ATC: 32 case gfx::GpuMemoryBuffer::ATC:
32 case gfx::GpuMemoryBuffer::ATCIA: 33 case gfx::GpuMemoryBuffer::ATCIA:
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 size_.width(), 391 size_.width(),
391 size_.height(), 392 size_.height(),
392 0, // border 393 0, // border
393 DataFormat(format_), 394 DataFormat(format_),
394 DataType(format_), 395 DataType(format_),
395 memory_); 396 memory_);
396 } 397 }
397 } 398 }
398 399
399 } // namespace gfx 400 } // namespace gfx
OLDNEW
« no previous file with comments | « gpu/command_buffer/tests/gl_gpu_memory_buffer_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698