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

Side by Side Diff: cc/animation/transform_operations.cc

Issue 12912010: cc: Convert non-const reference arguments to pointers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix ui/compositor Created 7 years, 9 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 | « cc/animation/transform_operation.cc ('k') | cc/base/math_util.h » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/animation/transform_operations.h" 5 #include "cc/animation/transform_operations.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ui/gfx/transform_util.h" 9 #include "ui/gfx/transform_util.h"
10 #include "ui/gfx/vector3d_f.h" 10 #include "ui/gfx/vector3d_f.h"
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 if (MatchesTypes(from)) { 150 if (MatchesTypes(from)) {
151 size_t num_operations = 151 size_t num_operations =
152 std::max(from_identity ? 0 : from.operations_.size(), 152 std::max(from_identity ? 0 : from.operations_.size(),
153 to_identity ? 0 : operations_.size()); 153 to_identity ? 0 : operations_.size());
154 for (size_t i = 0; i < num_operations; ++i) { 154 for (size_t i = 0; i < num_operations; ++i) {
155 gfx::Transform blended; 155 gfx::Transform blended;
156 if (!TransformOperation::BlendTransformOperations( 156 if (!TransformOperation::BlendTransformOperations(
157 from_identity ? 0 : &from.operations_[i], 157 from_identity ? 0 : &from.operations_[i],
158 to_identity ? 0 : &operations_[i], 158 to_identity ? 0 : &operations_[i],
159 progress, 159 progress,
160 blended)) 160 &blended))
161 return false; 161 return false;
162 result->PreconcatTransform(blended); 162 result->PreconcatTransform(blended);
163 } 163 }
164 return true; 164 return true;
165 } 165 }
166 166
167 if (progress <= 0.0) { 167 if (progress <= 0.0) {
168 *result = from.Apply(); 168 *result = from.Apply();
169 return true; 169 return true;
170 } 170 }
(...skipping 23 matching lines...) Expand all
194 decomposed_transform_.reset(new gfx::DecomposedTransform()); 194 decomposed_transform_.reset(new gfx::DecomposedTransform());
195 gfx::Transform transform = Apply(); 195 gfx::Transform transform = Apply();
196 if (!gfx::DecomposeTransform(decomposed_transform_.get(), transform)) 196 if (!gfx::DecomposeTransform(decomposed_transform_.get(), transform))
197 return false; 197 return false;
198 decomposed_transform_dirty_ = false; 198 decomposed_transform_dirty_ = false;
199 } 199 }
200 return true; 200 return true;
201 } 201 }
202 202
203 } // namespace cc 203 } // namespace cc
OLDNEW
« no previous file with comments | « cc/animation/transform_operation.cc ('k') | cc/base/math_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698