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

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

Issue 2128633002: cc: Set up the framework to restrict access to Layer internals. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move out the inner struct. Created 4 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/layers/painted_scrollbar_layer.cc ('k') | cc/layers/video_layer.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 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/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 bool allow_mailbox_reuse = false; 194 bool allow_mailbox_reuse = false;
195 SetTextureMailboxInternal(mailbox, std::move(release_callback), 195 SetTextureMailboxInternal(mailbox, std::move(release_callback),
196 requires_commit, allow_mailbox_reuse); 196 requires_commit, allow_mailbox_reuse);
197 updated = true; 197 updated = true;
198 } 198 }
199 } 199 }
200 200
201 // SetTextureMailbox could be called externally and the same mailbox used for 201 // SetTextureMailbox could be called externally and the same mailbox used for
202 // different textures. Such callers notify this layer that the texture has 202 // different textures. Such callers notify this layer that the texture has
203 // changed by calling SetNeedsDisplay, so check for that here. 203 // changed by calling SetNeedsDisplay, so check for that here.
204 return updated || !update_rect_.IsEmpty(); 204 return updated || !update_rect().IsEmpty();
205 } 205 }
206 206
207 void TextureLayer::PushPropertiesTo(LayerImpl* layer) { 207 void TextureLayer::PushPropertiesTo(LayerImpl* layer) {
208 Layer::PushPropertiesTo(layer); 208 Layer::PushPropertiesTo(layer);
209 TRACE_EVENT0("cc", "TextureLayer::PushPropertiesTo"); 209 TRACE_EVENT0("cc", "TextureLayer::PushPropertiesTo");
210 210
211 TextureLayerImpl* texture_layer = static_cast<TextureLayerImpl*>(layer); 211 TextureLayerImpl* texture_layer = static_cast<TextureLayerImpl*>(layer);
212 texture_layer->SetFlipped(flipped_); 212 texture_layer->SetFlipped(flipped_);
213 texture_layer->SetNearestNeighbor(nearest_neighbor_); 213 texture_layer->SetNearestNeighbor(nearest_neighbor_);
214 texture_layer->SetUVTopLeft(uv_top_left_); 214 texture_layer->SetUVTopLeft(uv_top_left_);
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 void TextureLayer::TextureMailboxHolder::ReturnAndReleaseOnImplThread( 296 void TextureLayer::TextureMailboxHolder::ReturnAndReleaseOnImplThread(
297 const gpu::SyncToken& sync_token, 297 const gpu::SyncToken& sync_token,
298 bool is_lost, 298 bool is_lost,
299 BlockingTaskRunner* main_thread_task_runner) { 299 BlockingTaskRunner* main_thread_task_runner) {
300 Return(sync_token, is_lost); 300 Return(sync_token, is_lost);
301 main_thread_task_runner->PostTask( 301 main_thread_task_runner->PostTask(
302 FROM_HERE, base::Bind(&TextureMailboxHolder::InternalRelease, this)); 302 FROM_HERE, base::Bind(&TextureMailboxHolder::InternalRelease, this));
303 } 303 }
304 304
305 } // namespace cc 305 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/painted_scrollbar_layer.cc ('k') | cc/layers/video_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698