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

Side by Side Diff: cc/resources/resource_format.cc

Issue 2786103003: Add half-float IOSurface GpuMemoryBuffer support (Closed)
Patch Set: Review feedback Created 3 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 | « cc/raster/raster_buffer_provider.cc ('k') | cc/resources/resource_provider.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "cc/resources/resource_format.h" 5 #include "cc/resources/resource_format.h"
6 6
7 #include "third_party/khronos/GLES2/gl2.h" 7 #include "third_party/khronos/GLES2/gl2.h"
8 #include "third_party/khronos/GLES2/gl2ext.h" 8 #include "third_party/khronos/GLES2/gl2ext.h"
9 #include "ui/gfx/gpu_memory_buffer.h" 9 #include "ui/gfx/gpu_memory_buffer.h"
10 10
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 case BGRA_8888: 107 case BGRA_8888:
108 return gfx::BufferFormat::BGRA_8888; 108 return gfx::BufferFormat::BGRA_8888;
109 case RED_8: 109 case RED_8:
110 return gfx::BufferFormat::R_8; 110 return gfx::BufferFormat::R_8;
111 case RGBA_4444: 111 case RGBA_4444:
112 return gfx::BufferFormat::RGBA_4444; 112 return gfx::BufferFormat::RGBA_4444;
113 case RGBA_8888: 113 case RGBA_8888:
114 return gfx::BufferFormat::RGBA_8888; 114 return gfx::BufferFormat::RGBA_8888;
115 case ETC1: 115 case ETC1:
116 return gfx::BufferFormat::ETC1; 116 return gfx::BufferFormat::ETC1;
117 case RGBA_F16:
118 return gfx::BufferFormat::RGBA_F16;
117 case ALPHA_8: 119 case ALPHA_8:
118 case LUMINANCE_8: 120 case LUMINANCE_8:
119 case RGB_565: 121 case RGB_565:
120 case LUMINANCE_F16: 122 case LUMINANCE_F16:
121 case RGBA_F16:
122 break; 123 break;
123 } 124 }
124 NOTREACHED(); 125 NOTREACHED();
125 return gfx::BufferFormat::RGBA_8888; 126 return gfx::BufferFormat::RGBA_8888;
126 } 127 }
127 128
128 bool IsResourceFormatCompressed(ResourceFormat format) { 129 bool IsResourceFormatCompressed(ResourceFormat format) {
129 return format == ETC1; 130 return format == ETC1;
130 } 131 }
131 132
(...skipping 10 matching lines...) Expand all
142 case ETC1: 143 case ETC1:
143 case RED_8: 144 case RED_8:
144 case LUMINANCE_F16: 145 case LUMINANCE_F16:
145 return false; 146 return false;
146 } 147 }
147 NOTREACHED(); 148 NOTREACHED();
148 return false; 149 return false;
149 } 150 }
150 151
151 } // namespace cc 152 } // namespace cc
OLDNEW
« no previous file with comments | « cc/raster/raster_buffer_provider.cc ('k') | cc/resources/resource_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698