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

Side by Side Diff: cc/playback/largest_display_item.cc

Issue 2640983002: Rename paint data structures (Closed)
Patch Set: Clean up comments, fix mac build Created 3 years, 11 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
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/playback/largest_display_item.h" 5 #include "cc/playback/largest_display_item.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
11 #include "cc/playback/clip_display_item.h" 11 #include "cc/playback/clip_display_item.h"
12 #include "cc/playback/clip_path_display_item.h" 12 #include "cc/playback/clip_path_display_item.h"
13 #include "cc/playback/compositing_display_item.h" 13 #include "cc/playback/compositing_display_item.h"
14 #include "cc/playback/drawing_display_item.h" 14 #include "cc/playback/drawing_display_item.h"
15 #include "cc/playback/filter_display_item.h" 15 #include "cc/playback/filter_display_item.h"
16 #include "cc/playback/float_clip_display_item.h" 16 #include "cc/playback/float_clip_display_item.h"
17 #include "cc/playback/transform_display_item.h" 17 #include "cc/playback/transform_display_item.h"
18 18
19 #include "third_party/skia/include/core/SkPicture.h"
20
21 namespace { 19 namespace {
22 // Either FilterDisplayItem or TransformDisplayItem is largest. It depends on 20 // Either FilterDisplayItem or TransformDisplayItem is largest. It depends on
23 // the platform. 21 // the platform.
24 constexpr size_t kLargestDisplayItemSize = 22 constexpr size_t kLargestDisplayItemSize =
25 sizeof(cc::FilterDisplayItem) > sizeof(cc::TransformDisplayItem) 23 sizeof(cc::FilterDisplayItem) > sizeof(cc::TransformDisplayItem)
26 ? sizeof(cc::FilterDisplayItem) 24 ? sizeof(cc::FilterDisplayItem)
27 : sizeof(cc::TransformDisplayItem); 25 : sizeof(cc::TransformDisplayItem);
28 } // namespace 26 } // namespace
29 27
30 namespace cc { 28 namespace cc {
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 "Largest Draw Quad size needs update. TransformDisplayItem" 67 "Largest Draw Quad size needs update. TransformDisplayItem"
70 " is currently largest."); 68 " is currently largest.");
71 static_assert(sizeof(EndTransformDisplayItem) <= kLargestDisplayItemSize, 69 static_assert(sizeof(EndTransformDisplayItem) <= kLargestDisplayItemSize,
72 "Largest Draw Quad size needs update. EndTransformDisplayItem" 70 "Largest Draw Quad size needs update. EndTransformDisplayItem"
73 " is currently largest."); 71 " is currently largest.");
74 72
75 return kLargestDisplayItemSize; 73 return kLargestDisplayItemSize;
76 } 74 }
77 75
78 } // namespace cc 76 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698