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

Side by Side Diff: gpu/command_buffer/tests/gl_manager.cc

Issue 916083002: Add support for compressed GPU memory buffers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add ATC and DXT feature detection and checking 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "gpu/command_buffer/tests/gl_manager.h" 5 #include "gpu/command_buffer/tests/gl_manager.h"
6 6
7 #include <GLES2/gl2.h> 7 #include <GLES2/gl2.h>
8 #include <GLES2/gl2ext.h> 8 #include <GLES2/gl2ext.h>
9 #include <GLES2/gl2extchromium.h> 9 #include <GLES2/gl2extchromium.h>
10 10
(...skipping 22 matching lines...) Expand all
33 #include "ui/gl/gl_context.h" 33 #include "ui/gl/gl_context.h"
34 #include "ui/gl/gl_image_ref_counted_memory.h" 34 #include "ui/gl/gl_image_ref_counted_memory.h"
35 #include "ui/gl/gl_share_group.h" 35 #include "ui/gl/gl_share_group.h"
36 #include "ui/gl/gl_surface.h" 36 #include "ui/gl/gl_surface.h"
37 37
38 namespace gpu { 38 namespace gpu {
39 namespace { 39 namespace {
40 40
41 size_t StrideInBytes(size_t width, gfx::GpuMemoryBuffer::Format format) { 41 size_t StrideInBytes(size_t width, gfx::GpuMemoryBuffer::Format format) {
42 switch (format) { 42 switch (format) {
43 case gfx::GpuMemoryBuffer::ATCIA:
44 case gfx::GpuMemoryBuffer::DXT5:
45 return width;
46 case gfx::GpuMemoryBuffer::ATC:
47 case gfx::GpuMemoryBuffer::DXT1:
48 case gfx::GpuMemoryBuffer::ETC1:
49 DCHECK_EQ(width % 2, 0);
50 return width / 2;
43 case gfx::GpuMemoryBuffer::RGBA_8888: 51 case gfx::GpuMemoryBuffer::RGBA_8888:
44 case gfx::GpuMemoryBuffer::BGRA_8888: 52 case gfx::GpuMemoryBuffer::BGRA_8888:
45 return width * 4; 53 return width * 4;
46 case gfx::GpuMemoryBuffer::RGBX_8888: 54 case gfx::GpuMemoryBuffer::RGBX_8888:
47 NOTREACHED(); 55 NOTREACHED();
48 return 0; 56 return 0;
49 } 57 }
50 58
51 NOTREACHED(); 59 NOTREACHED();
52 return 0; 60 return 0;
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 void GLManager::SetSurfaceVisible(bool visible) { 431 void GLManager::SetSurfaceVisible(bool visible) {
424 NOTIMPLEMENTED(); 432 NOTIMPLEMENTED();
425 } 433 }
426 434
427 uint32 GLManager::CreateStreamTexture(uint32 texture_id) { 435 uint32 GLManager::CreateStreamTexture(uint32 texture_id) {
428 NOTIMPLEMENTED(); 436 NOTIMPLEMENTED();
429 return 0; 437 return 0;
430 } 438 }
431 439
432 } // namespace gpu 440 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698