OLD | NEW |
---|---|
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/playback/display_item_list.h" | 5 #include "cc/playback/display_item_list.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "cc/output/filter_operation.h" | 9 #include "cc/output/filter_operation.h" |
10 #include "cc/output/filter_operations.h" | 10 #include "cc/output/filter_operations.h" |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
192 scoped_refptr<DisplayItemList> list = | 192 scoped_refptr<DisplayItemList> list = |
193 DisplayItemList::Create(gfx::Rect(layer_size), settings); | 193 DisplayItemList::Create(gfx::Rect(layer_size), settings); |
194 | 194 |
195 // Build the DrawingDisplayItem. | 195 // Build the DrawingDisplayItem. |
196 AppendFirstSerializationTestPicture(list, layer_size); | 196 AppendFirstSerializationTestPicture(list, layer_size); |
197 | 197 |
198 // Build the CompositingDisplayItem. | 198 // Build the CompositingDisplayItem. |
199 skia::RefPtr<SkColorFilter> filter = skia::AdoptRef( | 199 skia::RefPtr<SkColorFilter> filter = skia::AdoptRef( |
200 SkColorFilter::CreateLightingFilter(SK_ColorRED, SK_ColorGREEN)); | 200 SkColorFilter::CreateLightingFilter(SK_ColorRED, SK_ColorGREEN)); |
201 list->CreateAndAppendItem<CompositingDisplayItem>( | 201 list->CreateAndAppendItem<CompositingDisplayItem>( |
202 kVisualRect, 150, SkXfermode::Mode::kDst_Mode, nullptr, filter); | 202 kVisualRect, 150, SkXfermode::Mode::kDst_Mode, nullptr, filter, false); |
danakj
2015/12/11 19:07:00
can you pass true here, false is easier to get rig
| |
203 | 203 |
204 // Build the second DrawingDisplayItem. | 204 // Build the second DrawingDisplayItem. |
205 AppendSecondSerializationTestPicture(list, layer_size); | 205 AppendSecondSerializationTestPicture(list, layer_size); |
206 | 206 |
207 // Build the EndCompositingDisplayItem. | 207 // Build the EndCompositingDisplayItem. |
208 list->CreateAndAppendItem<EndCompositingDisplayItem>(kVisualRect); | 208 list->CreateAndAppendItem<EndCompositingDisplayItem>(kVisualRect); |
209 | 209 |
210 ValidateDisplayItemListSerialization(layer_size, list); | 210 ValidateDisplayItemListSerialization(layer_size, list); |
211 } | 211 } |
212 | 212 |
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
667 // picture and items are retained (currently this only happens due to certain | 667 // picture and items are retained (currently this only happens due to certain |
668 // categories being traced). | 668 // categories being traced). |
669 list = new DisplayItemList(layer_rect, caching_settings, true); | 669 list = new DisplayItemList(layer_rect, caching_settings, true); |
670 list->CreateAndAppendItem<DrawingDisplayItem>(kVisualRect, picture); | 670 list->CreateAndAppendItem<DrawingDisplayItem>(kVisualRect, picture); |
671 list->Finalize(); | 671 list->Finalize(); |
672 memory_usage = list->ApproximateMemoryUsage(); | 672 memory_usage = list->ApproximateMemoryUsage(); |
673 EXPECT_EQ(static_cast<size_t>(0), memory_usage); | 673 EXPECT_EQ(static_cast<size_t>(0), memory_usage); |
674 } | 674 } |
675 | 675 |
676 } // namespace cc | 676 } // namespace cc |
OLD | NEW |