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

Side by Side Diff: cc/raster/raster_buffer_provider.cc

Issue 2969223002: [media]: Replace LUMINANCE_F16 by R16 for 9/10-bit h264 videos.
Patch Set: Fix in resource_format_utils Created 3 years, 4 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/output/renderer_pixeltest.cc ('k') | cc/resources/resource_provider.h » ('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/raster/raster_buffer_provider.h" 5 #include "cc/raster/raster_buffer_provider.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/trace_event/trace_event.h" 9 #include "base/trace_event/trace_event.h"
10 #include "cc/raster/raster_source.h" 10 #include "cc/raster/raster_source.h"
(...skipping 19 matching lines...) Expand all
30 case viz::RGBA_8888: 30 case viz::RGBA_8888:
31 case viz::BGRA_8888: 31 case viz::BGRA_8888:
32 case viz::ETC1: 32 case viz::ETC1:
33 return true; 33 return true;
34 case viz::ALPHA_8: 34 case viz::ALPHA_8:
35 case viz::LUMINANCE_8: 35 case viz::LUMINANCE_8:
36 case viz::RGB_565: 36 case viz::RGB_565:
37 case viz::RED_8: 37 case viz::RED_8:
38 case viz::LUMINANCE_F16: 38 case viz::LUMINANCE_F16:
39 case viz::RGBA_F16: 39 case viz::RGBA_F16:
40 case viz::R16_EXT:
40 return false; 41 return false;
41 } 42 }
42 NOTREACHED(); 43 NOTREACHED();
43 return false; 44 return false;
44 } 45 }
45 46
46 } // anonymous namespace 47 } // anonymous namespace
47 48
48 // static 49 // static
49 void RasterBufferProvider::PlaybackToMemory( 50 void RasterBufferProvider::PlaybackToMemory(
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 bool rv = surface->readPixels(dst_info, memory, stride, 0, 0); 124 bool rv = surface->readPixels(dst_info, memory, stride, 0, 0);
124 DCHECK(rv); 125 DCHECK(rv);
125 } 126 }
126 return; 127 return;
127 } 128 }
128 case viz::ALPHA_8: 129 case viz::ALPHA_8:
129 case viz::LUMINANCE_8: 130 case viz::LUMINANCE_8:
130 case viz::RGB_565: 131 case viz::RGB_565:
131 case viz::RED_8: 132 case viz::RED_8:
132 case viz::LUMINANCE_F16: 133 case viz::LUMINANCE_F16:
134 case viz::R16_EXT:
133 NOTREACHED(); 135 NOTREACHED();
134 return; 136 return;
135 } 137 }
136 138
137 NOTREACHED(); 139 NOTREACHED();
138 } 140 }
139 141
140 bool RasterBufferProvider::ResourceFormatRequiresSwizzle( 142 bool RasterBufferProvider::ResourceFormatRequiresSwizzle(
141 viz::ResourceFormat format) { 143 viz::ResourceFormat format) {
142 switch (format) { 144 switch (format) {
143 case viz::RGBA_8888: 145 case viz::RGBA_8888:
144 case viz::BGRA_8888: 146 case viz::BGRA_8888:
145 // Initialize resource using the preferred viz::PlatformColor component 147 // Initialize resource using the preferred viz::PlatformColor component
146 // order and swizzle in the shader instead of in software. 148 // order and swizzle in the shader instead of in software.
147 return !viz::PlatformColor::SameComponentOrder(format); 149 return !viz::PlatformColor::SameComponentOrder(format);
148 case viz::RGBA_4444: 150 case viz::RGBA_4444:
149 case viz::ETC1: 151 case viz::ETC1:
150 case viz::ALPHA_8: 152 case viz::ALPHA_8:
151 case viz::LUMINANCE_8: 153 case viz::LUMINANCE_8:
152 case viz::RGB_565: 154 case viz::RGB_565:
153 case viz::RED_8: 155 case viz::RED_8:
154 case viz::LUMINANCE_F16: 156 case viz::LUMINANCE_F16:
155 case viz::RGBA_F16: 157 case viz::RGBA_F16:
158 case viz::R16_EXT:
156 return false; 159 return false;
157 } 160 }
158 NOTREACHED(); 161 NOTREACHED();
159 return false; 162 return false;
160 } 163 }
161 164
162 } // namespace cc 165 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/renderer_pixeltest.cc ('k') | cc/resources/resource_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698