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

Side by Side Diff: cc/output/ca_layer_overlay.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/layers/video_layer_impl.cc ('k') | cc/output/gl_renderer.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/output/ca_layer_overlay.h" 5 #include "cc/output/ca_layer_overlay.h"
6 6
7 #include "base/metrics/histogram_macros.h" 7 #include "base/metrics/histogram_macros.h"
8 #include "cc/quads/render_pass_draw_quad.h" 8 #include "cc/quads/render_pass_draw_quad.h"
9 #include "cc/quads/solid_color_draw_quad.h" 9 #include "cc/quads/solid_color_draw_quad.h"
10 #include "cc/quads/stream_video_draw_quad.h" 10 #include "cc/quads/stream_video_draw_quad.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 CA_LAYER_FAILED_SURFACE_CONTENT, 44 CA_LAYER_FAILED_SURFACE_CONTENT,
45 CA_LAYER_FAILED_YUV_VIDEO_CONTENT, 45 CA_LAYER_FAILED_YUV_VIDEO_CONTENT,
46 CA_LAYER_FAILED_DIFFERENT_CLIP_SETTINGS, 46 CA_LAYER_FAILED_DIFFERENT_CLIP_SETTINGS,
47 CA_LAYER_FAILED_DIFFERENT_VERTEX_OPACITIES, 47 CA_LAYER_FAILED_DIFFERENT_VERTEX_OPACITIES,
48 CA_LAYER_FAILED_RENDER_PASS_FILTER_SCALE, 48 CA_LAYER_FAILED_RENDER_PASS_FILTER_SCALE,
49 CA_LAYER_FAILED_RENDER_PASS_BACKGROUND_FILTERS, 49 CA_LAYER_FAILED_RENDER_PASS_BACKGROUND_FILTERS,
50 CA_LAYER_FAILED_RENDER_PASS_MASK, 50 CA_LAYER_FAILED_RENDER_PASS_MASK,
51 CA_LAYER_FAILED_RENDER_PASS_FILTER_OPERATION, 51 CA_LAYER_FAILED_RENDER_PASS_FILTER_OPERATION,
52 CA_LAYER_FAILED_RENDER_PASS_SORTING_CONTEXT_ID, 52 CA_LAYER_FAILED_RENDER_PASS_SORTING_CONTEXT_ID,
53 CA_LAYER_FAILED_TOO_MANY_RENDER_PASS_DRAW_QUADS, 53 CA_LAYER_FAILED_TOO_MANY_RENDER_PASS_DRAW_QUADS,
54 CA_LAYER_FAILED_Y_VIDEO_CONTENT,
54 CA_LAYER_FAILED_COUNT, 55 CA_LAYER_FAILED_COUNT,
55 }; 56 };
56 57
57 bool FilterOperationSupported(const FilterOperation& operation) { 58 bool FilterOperationSupported(const FilterOperation& operation) {
58 switch (operation.type()) { 59 switch (operation.type()) {
59 case FilterOperation::GRAYSCALE: 60 case FilterOperation::GRAYSCALE:
60 case FilterOperation::SEPIA: 61 case FilterOperation::SEPIA:
61 case FilterOperation::SATURATE: 62 case FilterOperation::SATURATE:
62 case FilterOperation::HUE_ROTATE: 63 case FilterOperation::HUE_ROTATE:
63 case FilterOperation::INVERT: 64 case FilterOperation::INVERT:
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 case DrawQuad::PICTURE_CONTENT: 231 case DrawQuad::PICTURE_CONTENT:
231 return CA_LAYER_FAILED_PICTURE_CONTENT; 232 return CA_LAYER_FAILED_PICTURE_CONTENT;
232 case DrawQuad::RENDER_PASS: 233 case DrawQuad::RENDER_PASS:
233 return FromRenderPassQuad(resource_provider, 234 return FromRenderPassQuad(resource_provider,
234 RenderPassDrawQuad::MaterialCast(quad), 235 RenderPassDrawQuad::MaterialCast(quad),
235 ca_layer_overlay); 236 ca_layer_overlay);
236 case DrawQuad::SURFACE_CONTENT: 237 case DrawQuad::SURFACE_CONTENT:
237 return CA_LAYER_FAILED_SURFACE_CONTENT; 238 return CA_LAYER_FAILED_SURFACE_CONTENT;
238 case DrawQuad::YUV_VIDEO_CONTENT: 239 case DrawQuad::YUV_VIDEO_CONTENT:
239 return CA_LAYER_FAILED_YUV_VIDEO_CONTENT; 240 return CA_LAYER_FAILED_YUV_VIDEO_CONTENT;
241 case DrawQuad::Y_VIDEO_CONTENT:
242 return CA_LAYER_FAILED_Y_VIDEO_CONTENT;
240 default: 243 default:
241 break; 244 break;
242 } 245 }
243 246
244 return CA_LAYER_FAILED_UNKNOWN; 247 return CA_LAYER_FAILED_UNKNOWN;
245 } 248 }
246 249
247 private: 250 private:
248 const SharedQuadState* most_recent_shared_quad_state_ = nullptr; 251 const SharedQuadState* most_recent_shared_quad_state_ = nullptr;
249 scoped_refptr<CALayerOverlaySharedState> most_recent_overlay_shared_state_; 252 scoped_refptr<CALayerOverlaySharedState> most_recent_overlay_shared_state_;
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 CA_LAYER_FAILED_COUNT); 315 CA_LAYER_FAILED_COUNT);
313 316
314 if (result != CA_LAYER_SUCCESS) { 317 if (result != CA_LAYER_SUCCESS) {
315 ca_layer_overlays->clear(); 318 ca_layer_overlays->clear();
316 return false; 319 return false;
317 } 320 }
318 return true; 321 return true;
319 } 322 }
320 323
321 } // namespace cc 324 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/video_layer_impl.cc ('k') | cc/output/gl_renderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698