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/display_item_list.cc

Issue 1213193003: Remove DCHECK_IMPLIES and CHECK_IMPLIES (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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/output/direct_renderer.cc ('k') | cc/playback/picture_pile.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 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 <string> 7 #include <string>
8 8
9 #include "base/numerics/safe_conversions.h" 9 #include "base/numerics/safe_conversions.h"
10 #include "base/trace_event/trace_event.h" 10 #include "base/trace_event/trace_event.h"
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 DCHECK(ProcessAppendedItemsCalled()); 198 DCHECK(ProcessAppendedItemsCalled());
199 return approximate_op_count_; 199 return approximate_op_count_;
200 } 200 }
201 201
202 size_t DisplayItemList::PictureMemoryUsage() const { 202 size_t DisplayItemList::PictureMemoryUsage() const {
203 DCHECK(ProcessAppendedItemsCalled()); 203 DCHECK(ProcessAppendedItemsCalled());
204 // We double-count in this case. Produce zero to avoid being misleading. 204 // We double-count in this case. Produce zero to avoid being misleading.
205 if (use_cached_picture_ && retain_individual_display_items_) 205 if (use_cached_picture_ && retain_individual_display_items_)
206 return 0; 206 return 0;
207 207
208 DCHECK_IMPLIES(use_cached_picture_, picture_); 208 DCHECK(!use_cached_picture_ || picture_);
209 return picture_memory_usage_; 209 return picture_memory_usage_;
210 } 210 }
211 211
212 scoped_refptr<base::trace_event::ConvertableToTraceFormat> 212 scoped_refptr<base::trace_event::ConvertableToTraceFormat>
213 DisplayItemList::AsValue(bool include_items) const { 213 DisplayItemList::AsValue(bool include_items) const {
214 DCHECK(ProcessAppendedItemsCalled()); 214 DCHECK(ProcessAppendedItemsCalled());
215 scoped_refptr<base::trace_event::TracedValue> state = 215 scoped_refptr<base::trace_event::TracedValue> state =
216 new base::trace_event::TracedValue(); 216 new base::trace_event::TracedValue();
217 217
218 if (include_items) { 218 if (include_items) {
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 return; 264 return;
265 265
266 pixel_refs_->GatherPixelRefsFromPicture(picture_.get()); 266 pixel_refs_->GatherPixelRefsFromPicture(picture_.get());
267 } 267 }
268 268
269 void* DisplayItemList::GetSidecar(DisplayItem* display_item) { 269 void* DisplayItemList::GetSidecar(DisplayItem* display_item) {
270 return items_.GetSidecar(display_item); 270 return items_.GetSidecar(display_item);
271 } 271 }
272 272
273 } // namespace cc 273 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/direct_renderer.cc ('k') | cc/playback/picture_pile.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698