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

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

Issue 1506203008: Allow background tab titles to use LCD AA. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments Created 5 years 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 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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 DisplayItemListSettings settings; 191 DisplayItemListSettings settings;
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 const bool kLcdTextAlwaysAllowed = false; // Name is the effect of "false".
201 list->CreateAndAppendItem<CompositingDisplayItem>( 202 list->CreateAndAppendItem<CompositingDisplayItem>(
202 kVisualRect, 150, SkXfermode::Mode::kDst_Mode, nullptr, filter); 203 kVisualRect, 150, SkXfermode::Mode::kDst_Mode, nullptr, filter,
204 kLcdTextAlwaysAllowed);
danakj 2015/12/11 22:44:02 in tests I'm less strict about naming boolean lite
Peter Kasting 2015/12/12 02:51:55 Done.
203 205
204 // Build the second DrawingDisplayItem. 206 // Build the second DrawingDisplayItem.
205 AppendSecondSerializationTestPicture(list, layer_size); 207 AppendSecondSerializationTestPicture(list, layer_size);
206 208
207 // Build the EndCompositingDisplayItem. 209 // Build the EndCompositingDisplayItem.
208 list->CreateAndAppendItem<EndCompositingDisplayItem>(kVisualRect); 210 list->CreateAndAppendItem<EndCompositingDisplayItem>(kVisualRect);
209 211
210 ValidateDisplayItemListSerialization(layer_size, list); 212 ValidateDisplayItemListSerialization(layer_size, list);
211 } 213 }
212 214
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
667 // picture and items are retained (currently this only happens due to certain 669 // picture and items are retained (currently this only happens due to certain
668 // categories being traced). 670 // categories being traced).
669 list = new DisplayItemList(layer_rect, caching_settings, true); 671 list = new DisplayItemList(layer_rect, caching_settings, true);
670 list->CreateAndAppendItem<DrawingDisplayItem>(kVisualRect, picture); 672 list->CreateAndAppendItem<DrawingDisplayItem>(kVisualRect, picture);
671 list->Finalize(); 673 list->Finalize();
672 memory_usage = list->ApproximateMemoryUsage(); 674 memory_usage = list->ApproximateMemoryUsage();
673 EXPECT_EQ(static_cast<size_t>(0), memory_usage); 675 EXPECT_EQ(static_cast<size_t>(0), memory_usage);
674 } 676 }
675 677
676 } // namespace cc 678 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698