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

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

Issue 139233002: [#4] Pass gfx structs by const ref (gfx::PointF) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Corrected as per review comments! Created 6 years, 11 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/layers/texture_layer.h ('k') | cc/layers/texture_layer_impl.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 2010 The Chromium Authors. All rights reserved. 1 // Copyright 2010 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/texture_layer.h" 5 #include "cc/layers/texture_layer.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback_helpers.h" 8 #include "base/callback_helpers.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/synchronization/lock.h" 10 #include "base/synchronization/lock.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 PassAs<LayerImpl>(); 62 PassAs<LayerImpl>();
63 } 63 }
64 64
65 void TextureLayer::SetFlipped(bool flipped) { 65 void TextureLayer::SetFlipped(bool flipped) {
66 if (flipped_ == flipped) 66 if (flipped_ == flipped)
67 return; 67 return;
68 flipped_ = flipped; 68 flipped_ = flipped;
69 SetNeedsCommit(); 69 SetNeedsCommit();
70 } 70 }
71 71
72 void TextureLayer::SetUV(gfx::PointF top_left, gfx::PointF bottom_right) { 72 void TextureLayer::SetUV(const gfx::PointF& top_left,
73 const gfx::PointF& bottom_right) {
73 if (uv_top_left_ == top_left && uv_bottom_right_ == bottom_right) 74 if (uv_top_left_ == top_left && uv_bottom_right_ == bottom_right)
74 return; 75 return;
75 uv_top_left_ = top_left; 76 uv_top_left_ = top_left;
76 uv_bottom_right_ = bottom_right; 77 uv_bottom_right_ = bottom_right;
77 SetNeedsCommit(); 78 SetNeedsCommit();
78 } 79 }
79 80
80 void TextureLayer::SetVertexOpacity(float bottom_left, 81 void TextureLayer::SetVertexOpacity(float bottom_left,
81 float top_left, 82 float top_left,
82 float top_right, 83 float top_right,
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 } 347 }
347 348
348 void TextureLayer::MailboxHolder::ReturnAndReleaseOnImplThread( 349 void TextureLayer::MailboxHolder::ReturnAndReleaseOnImplThread(
349 unsigned sync_point, bool is_lost) { 350 unsigned sync_point, bool is_lost) {
350 Return(sync_point, is_lost); 351 Return(sync_point, is_lost);
351 message_loop_->PostTask(FROM_HERE, 352 message_loop_->PostTask(FROM_HERE,
352 base::Bind(&MailboxHolder::InternalRelease, this)); 353 base::Bind(&MailboxHolder::InternalRelease, this));
353 } 354 }
354 355
355 } // namespace cc 356 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/texture_layer.h ('k') | cc/layers/texture_layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698