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/blink/web_display_item_list_impl.cc

Issue 1506203008: Allow background tab titles to use LCD AA. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use new Skia API name 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/blink/web_display_item_list_impl.h" 5 #include "cc/blink/web_display_item_list_impl.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "cc/blink/web_filter_operations_impl.h" 9 #include "cc/blink/web_filter_operations_impl.h"
10 #include "cc/playback/clip_display_item.h" 10 #include "cc/playback/clip_display_item.h"
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 SkRect* bounds, 164 SkRect* bounds,
165 SkColorFilter* color_filter) { 165 SkColorFilter* color_filter) {
166 DCHECK_GE(opacity, 0.f); 166 DCHECK_GE(opacity, 0.f);
167 DCHECK_LE(opacity, 1.f); 167 DCHECK_LE(opacity, 1.f);
168 // TODO(ajuma): This should really be rounding instead of flooring the alpha 168 // TODO(ajuma): This should really be rounding instead of flooring the alpha
169 // value, but that breaks slimming paint reftests. 169 // value, but that breaks slimming paint reftests.
170 170
171 if (display_item_list_->RetainsIndividualDisplayItems()) { 171 if (display_item_list_->RetainsIndividualDisplayItems()) {
172 display_item_list_->CreateAndAppendItem<cc::CompositingDisplayItem>( 172 display_item_list_->CreateAndAppendItem<cc::CompositingDisplayItem>(
173 visual_rect, static_cast<uint8_t>(gfx::ToFlooredInt(255 * opacity)), 173 visual_rect, static_cast<uint8_t>(gfx::ToFlooredInt(255 * opacity)),
174 xfermode, bounds, skia::SharePtr(color_filter)); 174 xfermode, bounds, skia::SharePtr(color_filter), false);
danakj 2015/12/11 19:07:00 can you use a temp var to give the boolean a name
175 } else { 175 } else {
176 cc::CompositingDisplayItem item( 176 cc::CompositingDisplayItem item(
177 static_cast<uint8_t>(gfx::ToFlooredInt(255 * opacity)), xfermode, 177 static_cast<uint8_t>(gfx::ToFlooredInt(255 * opacity)), xfermode,
178 bounds, skia::SharePtr(color_filter)); 178 bounds, skia::SharePtr(color_filter), false);
179 display_item_list_->RasterIntoCanvas(item); 179 display_item_list_->RasterIntoCanvas(item);
180 } 180 }
181 } 181 }
182 182
183 void WebDisplayItemListImpl::appendEndCompositingItem( 183 void WebDisplayItemListImpl::appendEndCompositingItem(
184 const blink::WebRect& visual_rect) { 184 const blink::WebRect& visual_rect) {
185 if (display_item_list_->RetainsIndividualDisplayItems()) { 185 if (display_item_list_->RetainsIndividualDisplayItems()) {
186 display_item_list_->CreateAndAppendItem<cc::EndCompositingDisplayItem>( 186 display_item_list_->CreateAndAppendItem<cc::EndCompositingDisplayItem>(
187 visual_rect); 187 visual_rect);
188 } else { 188 } else {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 228
229 void WebDisplayItemListImpl::appendEndScrollItem( 229 void WebDisplayItemListImpl::appendEndScrollItem(
230 const blink::WebRect& visual_rect) { 230 const blink::WebRect& visual_rect) {
231 appendEndTransformItem(visual_rect); 231 appendEndTransformItem(visual_rect);
232 } 232 }
233 233
234 WebDisplayItemListImpl::~WebDisplayItemListImpl() { 234 WebDisplayItemListImpl::~WebDisplayItemListImpl() {
235 } 235 }
236 236
237 } // namespace cc_blink 237 } // namespace cc_blink
OLDNEW
« no previous file with comments | « no previous file | cc/playback/compositing_display_item.h » ('j') | cc/playback/compositing_display_item.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698