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

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

Issue 2297213003: Fix CSS reference filters with negative transformed children. (Closed)
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/playback/filter_display_item.cc ('k') | cc/quads/draw_quad_unittest.cc » ('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/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" 19 #include "third_party/skia/include/core/SkPicture.h"
20 20
21 namespace { 21 namespace {
22 // Either ClipDisplayItem or TransformDisplayItem is largest. It depends on the 22 // Either FilterDisplayItem or TransformDisplayItem is largest. It depends on
23 // platform. 23 // the platform.
24 constexpr size_t kLargestDisplayItemSize = 24 constexpr size_t kLargestDisplayItemSize =
25 sizeof(cc::ClipDisplayItem) > sizeof(cc::TransformDisplayItem) 25 sizeof(cc::FilterDisplayItem) > sizeof(cc::TransformDisplayItem)
26 ? sizeof(cc::ClipDisplayItem) 26 ? sizeof(cc::FilterDisplayItem)
27 : sizeof(cc::TransformDisplayItem); 27 : sizeof(cc::TransformDisplayItem);
28 } // namespace 28 } // namespace
29 29
30 namespace cc { 30 namespace cc {
31 31
32 size_t LargestDisplayItemSize() { 32 size_t LargestDisplayItemSize() {
33 // Use compile assert to make sure largest is actually larger than all other 33 // Use compile assert to make sure largest is actually larger than all other
34 // type of display_items. 34 // type of display_items.
35 static_assert(sizeof(ClipDisplayItem) <= kLargestDisplayItemSize, 35 static_assert(sizeof(ClipDisplayItem) <= kLargestDisplayItemSize,
36 "Largest Draw Quad size needs update. ClipDisplayItem" 36 "Largest Draw Quad size needs update. ClipDisplayItem"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 "Largest Draw Quad size needs update. TransformDisplayItem" 69 "Largest Draw Quad size needs update. TransformDisplayItem"
70 " is currently largest."); 70 " is currently largest.");
71 static_assert(sizeof(EndTransformDisplayItem) <= kLargestDisplayItemSize, 71 static_assert(sizeof(EndTransformDisplayItem) <= kLargestDisplayItemSize,
72 "Largest Draw Quad size needs update. EndTransformDisplayItem" 72 "Largest Draw Quad size needs update. EndTransformDisplayItem"
73 " is currently largest."); 73 " is currently largest.");
74 74
75 return kLargestDisplayItemSize; 75 return kLargestDisplayItemSize;
76 } 76 }
77 77
78 } // namespace cc 78 } // namespace cc
OLDNEW
« no previous file with comments | « cc/playback/filter_display_item.cc ('k') | cc/quads/draw_quad_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698