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

Side by Side Diff: cc/layers/picture_layer.cc

Issue 1421483005: Reland: Remove DCHECK_IMPLIES/CHECK_IMPLIES. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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/input/top_controls_manager.cc ('k') | cc/layers/picture_layer_impl.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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/layers/picture_layer.h" 5 #include "cc/layers/picture_layer.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "cc/layers/content_layer_client.h" 8 #include "cc/layers/content_layer_client.h"
9 #include "cc/layers/picture_layer_impl.h" 9 #include "cc/layers/picture_layer_impl.h"
10 #include "cc/playback/display_list_recording_source.h" 10 #include "cc/playback/display_list_recording_source.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 PictureLayerImpl* layer_impl = static_cast<PictureLayerImpl*>(base_layer); 50 PictureLayerImpl* layer_impl = static_cast<PictureLayerImpl*>(base_layer);
51 // TODO(danakj): Make is_mask_ a constructor parameter for PictureLayer. 51 // TODO(danakj): Make is_mask_ a constructor parameter for PictureLayer.
52 DCHECK_EQ(layer_impl->is_mask(), is_mask_); 52 DCHECK_EQ(layer_impl->is_mask(), is_mask_);
53 53
54 int source_frame_number = layer_tree_host()->source_frame_number(); 54 int source_frame_number = layer_tree_host()->source_frame_number();
55 gfx::Size impl_bounds = layer_impl->bounds(); 55 gfx::Size impl_bounds = layer_impl->bounds();
56 gfx::Size recording_source_bounds = recording_source_->GetSize(); 56 gfx::Size recording_source_bounds = recording_source_->GetSize();
57 57
58 // If update called, then recording source size must match bounds pushed to 58 // If update called, then recording source size must match bounds pushed to
59 // impl layer. 59 // impl layer.
60 DCHECK_IMPLIES(update_source_frame_number_ == source_frame_number, 60 DCHECK(update_source_frame_number_ != source_frame_number ||
61 impl_bounds == recording_source_bounds) 61 impl_bounds == recording_source_bounds)
62 << " bounds " << impl_bounds.ToString() << " recording source " 62 << " bounds " << impl_bounds.ToString() << " recording source "
63 << recording_source_bounds.ToString(); 63 << recording_source_bounds.ToString();
64 64
65 if (update_source_frame_number_ != source_frame_number && 65 if (update_source_frame_number_ != source_frame_number &&
66 recording_source_bounds != impl_bounds) { 66 recording_source_bounds != impl_bounds) {
67 // Update may not get called for the layer (if it's not in the viewport 67 // Update may not get called for the layer (if it's not in the viewport
68 // for example, even though it has resized making the recording source no 68 // for example, even though it has resized making the recording source no
69 // longer valid. In this case just destroy the recording source. 69 // longer valid. In this case just destroy the recording source.
70 recording_source_->SetEmptyBounds(); 70 recording_source_->SetEmptyBounds();
71 } 71 }
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 208
209 bool PictureLayer::HasDrawableContent() const { 209 bool PictureLayer::HasDrawableContent() const {
210 return client_ && Layer::HasDrawableContent(); 210 return client_ && Layer::HasDrawableContent();
211 } 211 }
212 212
213 void PictureLayer::RunMicroBenchmark(MicroBenchmark* benchmark) { 213 void PictureLayer::RunMicroBenchmark(MicroBenchmark* benchmark) {
214 benchmark->RunOnLayer(this); 214 benchmark->RunOnLayer(this);
215 } 215 }
216 216
217 } // namespace cc 217 } // namespace cc
OLDNEW
« no previous file with comments | « cc/input/top_controls_manager.cc ('k') | cc/layers/picture_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698