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

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

Issue 19668008: cc: Remove some DCHECKs in CopyOutputRequest code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: readback-bad-dchecks: threadsafe test Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | cc/trees/layer_tree_host_unittest.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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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/layer_impl.h" 5 #include "cc/layers/layer_impl.h"
6 6
7 #include "base/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "cc/animation/animation_registrar.h" 9 #include "cc/animation/animation_registrar.h"
10 #include "cc/animation/scrollbar_animation_controller.h" 10 #include "cc/animation/scrollbar_animation_controller.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 return; 101 return;
102 102
103 children_.clear(); 103 children_.clear();
104 layer_tree_impl()->set_needs_update_draw_properties(); 104 layer_tree_impl()->set_needs_update_draw_properties();
105 } 105 }
106 106
107 void LayerImpl::PassCopyRequests(ScopedPtrVector<CopyOutputRequest>* requests) { 107 void LayerImpl::PassCopyRequests(ScopedPtrVector<CopyOutputRequest>* requests) {
108 if (requests->empty()) 108 if (requests->empty())
109 return; 109 return;
110 110
111 DCHECK(copy_requests_.empty());
112
113 copy_requests_.insert_and_take(copy_requests_.end(), *requests); 111 copy_requests_.insert_and_take(copy_requests_.end(), *requests);
114 requests->clear(); 112 requests->clear();
115 113
116 if (layer_tree_impl()->IsActiveTree()) 114 if (layer_tree_impl()->IsActiveTree())
117 layer_tree_impl()->AddLayerWithCopyOutputRequest(this); 115 layer_tree_impl()->AddLayerWithCopyOutputRequest(this);
118 NoteLayerPropertyChangedForSubtree(); 116 NoteLayerPropertyChangedForSubtree();
119 } 117 }
120 118
121 void LayerImpl::TakeCopyRequestsAndTransformToTarget( 119 void LayerImpl::TakeCopyRequestsAndTransformToTarget(
122 ScopedPtrVector<CopyOutputRequest>* requests) { 120 ScopedPtrVector<CopyOutputRequest>* requests) {
(...skipping 998 matching lines...) Expand 10 before | Expand all | Expand 10 after
1121 1119
1122 size_t LayerImpl::GPUMemoryUsageInBytes() const { return 0; } 1120 size_t LayerImpl::GPUMemoryUsageInBytes() const { return 0; }
1123 1121
1124 scoped_ptr<base::Value> LayerImpl::AsValue() const { 1122 scoped_ptr<base::Value> LayerImpl::AsValue() const {
1125 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue()); 1123 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue());
1126 AsValueInto(state.get()); 1124 AsValueInto(state.get());
1127 return state.PassAs<base::Value>(); 1125 return state.PassAs<base::Value>();
1128 } 1126 }
1129 1127
1130 } // namespace cc 1128 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698