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/layers/texture_layer.cc

Issue 1175113010: cc: Rename visible_content_rect and content stuff on quads. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rename-visible-content-rect: moreandroid Created 5 years, 6 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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 TextureMailboxHolder* holder = holder_ref_->holder(); 260 TextureMailboxHolder* holder = holder_ref_->holder();
261 texture_mailbox = holder->mailbox(); 261 texture_mailbox = holder->mailbox();
262 release_callback_impl = holder->GetCallbackForImplThread(); 262 release_callback_impl = holder->GetCallbackForImplThread();
263 } 263 }
264 texture_layer->SetTextureMailbox(texture_mailbox, 264 texture_layer->SetTextureMailbox(texture_mailbox,
265 release_callback_impl.Pass()); 265 release_callback_impl.Pass());
266 needs_set_mailbox_ = false; 266 needs_set_mailbox_ = false;
267 } 267 }
268 } 268 }
269 269
270 SimpleEnclosedRegion TextureLayer::VisibleContentOpaqueRegion() const {
271 if (contents_opaque())
272 return SimpleEnclosedRegion(visible_content_rect());
273
274 if (blend_background_color_ && (SkColorGetA(background_color()) == 0xFF))
275 return SimpleEnclosedRegion(visible_content_rect());
276
277 return SimpleEnclosedRegion();
278 }
279
280 TextureLayer::TextureMailboxHolder::MainThreadReference::MainThreadReference( 270 TextureLayer::TextureMailboxHolder::MainThreadReference::MainThreadReference(
281 TextureMailboxHolder* holder) 271 TextureMailboxHolder* holder)
282 : holder_(holder) { 272 : holder_(holder) {
283 holder_->InternalAddRef(); 273 holder_->InternalAddRef();
284 } 274 }
285 275
286 TextureLayer::TextureMailboxHolder::MainThreadReference:: 276 TextureLayer::TextureMailboxHolder::MainThreadReference::
287 ~MainThreadReference() { 277 ~MainThreadReference() {
288 holder_->InternalRelease(); 278 holder_->InternalRelease();
289 } 279 }
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 void TextureLayer::TextureMailboxHolder::ReturnAndReleaseOnImplThread( 333 void TextureLayer::TextureMailboxHolder::ReturnAndReleaseOnImplThread(
344 uint32 sync_point, 334 uint32 sync_point,
345 bool is_lost, 335 bool is_lost,
346 BlockingTaskRunner* main_thread_task_runner) { 336 BlockingTaskRunner* main_thread_task_runner) {
347 Return(sync_point, is_lost); 337 Return(sync_point, is_lost);
348 main_thread_task_runner->PostTask( 338 main_thread_task_runner->PostTask(
349 FROM_HERE, base::Bind(&TextureMailboxHolder::InternalRelease, this)); 339 FROM_HERE, base::Bind(&TextureMailboxHolder::InternalRelease, this));
350 } 340 }
351 341
352 } // namespace cc 342 } // 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