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

Unified Diff: ui/compositor/layer.cc

Issue 15984016: Call scoped_refptr<T>::get() rather than relying on implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/host/remoting_me2me_host.cc ('k') | webkit/browser/appcache/appcache_storage_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/layer.cc
diff --git a/ui/compositor/layer.cc b/ui/compositor/layer.cc
index 3949402e4961abca80cd21a83157b9712abcf118..fa6018181cca031ea299c4e82e8a38a5c762c012 100644
--- a/ui/compositor/layer.cc
+++ b/ui/compositor/layer.cc
@@ -518,10 +518,10 @@ void Layer::SetExternalTexture(Texture* texture) {
void Layer::SetTextureMailbox(const cc::TextureMailbox& mailbox,
float scale_factor) {
DCHECK_EQ(type_, LAYER_TEXTURED);
- DCHECK(!solid_color_layer_);
+ DCHECK(!solid_color_layer_.get());
layer_updated_externally_ = true;
texture_ = NULL;
- if (!texture_layer_ || !texture_layer_->uses_mailbox()) {
+ if (!texture_layer_.get() || !texture_layer_->uses_mailbox()) {
scoped_refptr<cc::TextureLayer> new_layer =
cc::TextureLayer::CreateForMailbox(this);
new_layer->SetFlipped(false);
@@ -667,7 +667,7 @@ unsigned Layer::PrepareTexture(cc::ResourceUpdateQueue* queue) {
WebKit::WebGraphicsContext3D* Layer::Context3d() {
DCHECK(texture_layer_.get());
- if (texture_)
+ if (texture_.get())
return texture_->HostContext3D();
return NULL;
}
@@ -949,7 +949,7 @@ void Layer::RecomputeDrawsContentAndUVRect() {
if (texture_layer_.get()) {
gfx::Size texture_size;
if (!texture_layer_->uses_mailbox()) {
- DCHECK(texture_);
+ DCHECK(texture_.get());
float texture_scale_factor = 1.0f / texture_->device_scale_factor();
texture_size = gfx::ToFlooredSize(
gfx::ScaleSize(texture_->size(), texture_scale_factor));
« no previous file with comments | « remoting/host/remoting_me2me_host.cc ('k') | webkit/browser/appcache/appcache_storage_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698