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

Side by Side Diff: cc/quads/largest_draw_quad.cc

Issue 2271683004: Revert of Support for custom primaries (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 3 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/color_lut_cache.cc ('k') | ui/gfx/color_space.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/quads/largest_draw_quad.h" 5 #include "cc/quads/largest_draw_quad.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
11 #include "cc/quads/debug_border_draw_quad.h" 11 #include "cc/quads/debug_border_draw_quad.h"
12 #include "cc/quads/picture_draw_quad.h" 12 #include "cc/quads/picture_draw_quad.h"
13 #include "cc/quads/render_pass_draw_quad.h" 13 #include "cc/quads/render_pass_draw_quad.h"
14 #include "cc/quads/solid_color_draw_quad.h" 14 #include "cc/quads/solid_color_draw_quad.h"
15 #include "cc/quads/stream_video_draw_quad.h" 15 #include "cc/quads/stream_video_draw_quad.h"
16 #include "cc/quads/surface_draw_quad.h" 16 #include "cc/quads/surface_draw_quad.h"
17 #include "cc/quads/texture_draw_quad.h" 17 #include "cc/quads/texture_draw_quad.h"
18 #include "cc/quads/tile_draw_quad.h" 18 #include "cc/quads/tile_draw_quad.h"
19 #include "cc/quads/yuv_video_draw_quad.h" 19 #include "cc/quads/yuv_video_draw_quad.h"
20 20
21 namespace { 21 namespace {
22 const size_t kLargestDrawQuadSize = sizeof(cc::YUVVideoDrawQuad); 22 const size_t kLargestDrawQuadSize =
23 sizeof(cc::RenderPassDrawQuad) > sizeof(cc::StreamVideoDrawQuad)
24 ? sizeof(cc::RenderPassDrawQuad)
25 : sizeof(cc::StreamVideoDrawQuad);
23 } // namespace 26 } // namespace
24 27
25 namespace cc { 28 namespace cc {
26 29
27 size_t LargestDrawQuadSize() { 30 size_t LargestDrawQuadSize() {
28 // Currently the largest quad is either a RenderPassDrawQuad or a 31 // Currently the largest quad is either a RenderPassDrawQuad or a
29 // StreamVideoDrawQuad depends on hardware structure. 32 // StreamVideoDrawQuad depends on hardware structure.
30 33
31 // Use compile assert to make sure largest is actually larger than all other 34 // Use compile assert to make sure largest is actually larger than all other
32 // type of draw quads. 35 // type of draw quads.
(...skipping 16 matching lines...) Expand all
49 "Largest Draw Quad size needs update. TileDrawQuad is " 52 "Largest Draw Quad size needs update. TileDrawQuad is "
50 "currently largest."); 53 "currently largest.");
51 static_assert(sizeof(YUVVideoDrawQuad) <= kLargestDrawQuadSize, 54 static_assert(sizeof(YUVVideoDrawQuad) <= kLargestDrawQuadSize,
52 "Largest Draw Quad size needs update. YUVVideoDrawQuad is " 55 "Largest Draw Quad size needs update. YUVVideoDrawQuad is "
53 "currently largest."); 56 "currently largest.");
54 57
55 return kLargestDrawQuadSize; 58 return kLargestDrawQuadSize;
56 } 59 }
57 60
58 } // namespace cc 61 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/color_lut_cache.cc ('k') | ui/gfx/color_space.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698