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

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

Issue 2121043002: 16 bpp video stream capture, render and WebGL usage - Realsense R200 & SR300 support. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 2 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/quads/y_video_draw_quad.cc ('k') | cc/resources/platform_color.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/playback/raster_source.h" 10 #include "cc/playback/raster_source.h"
(...skipping 16 matching lines...) Expand all
27 case RGBA_4444: 27 case RGBA_4444:
28 case RGBA_8888: 28 case RGBA_8888:
29 case BGRA_8888: 29 case BGRA_8888:
30 case ETC1: 30 case ETC1:
31 return true; 31 return true;
32 case ALPHA_8: 32 case ALPHA_8:
33 case LUMINANCE_8: 33 case LUMINANCE_8:
34 case RGB_565: 34 case RGB_565:
35 case RED_8: 35 case RED_8:
36 case LUMINANCE_F16: 36 case LUMINANCE_F16:
37 case RG_88:
37 return false; 38 return false;
38 } 39 }
39 NOTREACHED(); 40 NOTREACHED();
40 return false; 41 return false;
41 } 42 }
42 43
43 } // anonymous namespace 44 } // anonymous namespace
44 45
45 // static 46 // static
46 void RasterBufferProvider::PlaybackToMemory( 47 void RasterBufferProvider::PlaybackToMemory(
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 bool rv = surface->readPixels(dst_info, memory, stride, 0, 0); 115 bool rv = surface->readPixels(dst_info, memory, stride, 0, 0);
115 DCHECK(rv); 116 DCHECK(rv);
116 } 117 }
117 return; 118 return;
118 } 119 }
119 case ALPHA_8: 120 case ALPHA_8:
120 case LUMINANCE_8: 121 case LUMINANCE_8:
121 case RGB_565: 122 case RGB_565:
122 case RED_8: 123 case RED_8:
123 case LUMINANCE_F16: 124 case LUMINANCE_F16:
125 case RG_88:
124 NOTREACHED(); 126 NOTREACHED();
125 return; 127 return;
126 } 128 }
127 129
128 NOTREACHED(); 130 NOTREACHED();
129 } 131 }
130 132
131 bool RasterBufferProvider::ResourceFormatRequiresSwizzle( 133 bool RasterBufferProvider::ResourceFormatRequiresSwizzle(
132 ResourceFormat format) { 134 ResourceFormat format) {
133 switch (format) { 135 switch (format) {
134 case RGBA_8888: 136 case RGBA_8888:
135 case BGRA_8888: 137 case BGRA_8888:
136 // Initialize resource using the preferred PlatformColor component 138 // Initialize resource using the preferred PlatformColor component
137 // order and swizzle in the shader instead of in software. 139 // order and swizzle in the shader instead of in software.
138 return !PlatformColor::SameComponentOrder(format); 140 return !PlatformColor::SameComponentOrder(format);
139 case RGBA_4444: 141 case RGBA_4444:
140 case ETC1: 142 case ETC1:
141 case ALPHA_8: 143 case ALPHA_8:
142 case LUMINANCE_8: 144 case LUMINANCE_8:
143 case RGB_565: 145 case RGB_565:
144 case RED_8: 146 case RED_8:
145 case LUMINANCE_F16: 147 case LUMINANCE_F16:
148 case RG_88:
146 return false; 149 return false;
147 } 150 }
148 NOTREACHED(); 151 NOTREACHED();
149 return false; 152 return false;
150 } 153 }
151 154
152 } // namespace cc 155 } // namespace cc
OLDNEW
« no previous file with comments | « cc/quads/y_video_draw_quad.cc ('k') | cc/resources/platform_color.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698