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

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

Issue 2229953003: Support for custom primaries (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: test updated 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/quads/draw_quad_unittest.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 = 22 const size_t kLargestDrawQuadSize =
23 sizeof(cc::RenderPassDrawQuad) > sizeof(cc::StreamVideoDrawQuad) 23 sizeof(cc::YUVVideoDrawQuad) + sizeof(gfx::ColorSpace);
24 ? sizeof(cc::RenderPassDrawQuad)
25 : sizeof(cc::StreamVideoDrawQuad);
26 } // namespace 24 } // namespace
27 25
28 namespace cc { 26 namespace cc {
29 27
30 size_t LargestDrawQuadSize() { 28 size_t LargestDrawQuadSize() {
31 // Currently the largest quad is either a RenderPassDrawQuad or a 29 // Currently the largest quad is either a RenderPassDrawQuad or a
32 // StreamVideoDrawQuad depends on hardware structure. 30 // StreamVideoDrawQuad depends on hardware structure.
33 31
34 // Use compile assert to make sure largest is actually larger than all other 32 // Use compile assert to make sure largest is actually larger than all other
35 // type of draw quads. 33 // type of draw quads.
(...skipping 16 matching lines...) Expand all
52 "Largest Draw Quad size needs update. TileDrawQuad is " 50 "Largest Draw Quad size needs update. TileDrawQuad is "
53 "currently largest."); 51 "currently largest.");
54 static_assert(sizeof(YUVVideoDrawQuad) <= kLargestDrawQuadSize, 52 static_assert(sizeof(YUVVideoDrawQuad) <= kLargestDrawQuadSize,
55 "Largest Draw Quad size needs update. YUVVideoDrawQuad is " 53 "Largest Draw Quad size needs update. YUVVideoDrawQuad is "
56 "currently largest."); 54 "currently largest.");
57 55
58 return kLargestDrawQuadSize; 56 return kLargestDrawQuadSize;
59 } 57 }
60 58
61 } // namespace cc 59 } // namespace cc
OLDNEW
« no previous file with comments | « cc/quads/draw_quad_unittest.cc ('k') | ui/gfx/color_space.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698