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

Side by Side Diff: content/browser/compositor/reflector_impl.cc

Issue 500953005: Remove implicit conversions from scoped_refptr to T* in content/browser/compositor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Manual corretions Created 6 years, 3 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 | « content/browser/compositor/onscreen_display_client.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "content/browser/compositor/reflector_impl.h" 5 #include "content/browser/compositor/reflector_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "content/browser/compositor/browser_compositor_output_surface.h" 9 #include "content/browser/compositor/browser_compositor_output_surface.h"
10 #include "content/browser/compositor/owned_mailbox.h" 10 #include "content/browser/compositor/owned_mailbox.h"
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 output_surface->SetReflector(this); 194 output_surface->SetReflector(this);
195 // The texture doesn't have the data, so invokes full redraw now. 195 // The texture doesn't have the data, so invokes full redraw now.
196 main_message_loop_->PostTask( 196 main_message_loop_->PostTask(
197 FROM_HERE, 197 FROM_HERE,
198 base::Bind(&ReflectorImpl::FullRedrawContentOnMainThread, 198 base::Bind(&ReflectorImpl::FullRedrawContentOnMainThread,
199 scoped_refptr<ReflectorImpl>(this))); 199 scoped_refptr<ReflectorImpl>(this)));
200 } 200 }
201 201
202 void ReflectorImpl::UpdateTextureSizeOnMainThread(gfx::Size size) { 202 void ReflectorImpl::UpdateTextureSizeOnMainThread(gfx::Size size) {
203 MainThreadData& main = GetMain(); 203 MainThreadData& main = GetMain();
204 if (!main.mirroring_layer || !main.mailbox || 204 if (!main.mirroring_layer || !main.mailbox.get() ||
205 main.mailbox->mailbox().IsZero()) 205 main.mailbox->mailbox().IsZero())
206 return; 206 return;
207 if (main.needs_set_mailbox) { 207 if (main.needs_set_mailbox) {
208 main.mirroring_layer->SetTextureMailbox( 208 main.mirroring_layer->SetTextureMailbox(
209 cc::TextureMailbox(main.mailbox->holder()), 209 cc::TextureMailbox(main.mailbox->holder()),
210 cc::SingleReleaseCallback::Create( 210 cc::SingleReleaseCallback::Create(
211 base::Bind(ReleaseMailbox, main.mailbox)), 211 base::Bind(ReleaseMailbox, main.mailbox)),
212 size); 212 size);
213 main.needs_set_mailbox = false; 213 main.needs_set_mailbox = false;
214 } else { 214 } else {
(...skipping 21 matching lines...) Expand all
236 gfx::Rect new_rect(rect.x(), y, rect.width(), rect.height()); 236 gfx::Rect new_rect(rect.x(), y, rect.width(), rect.height());
237 main.mirroring_layer->SchedulePaint(new_rect); 237 main.mirroring_layer->SchedulePaint(new_rect);
238 } 238 }
239 239
240 void ReflectorImpl::FullRedrawContentOnMainThread() { 240 void ReflectorImpl::FullRedrawContentOnMainThread() {
241 MainThreadData& main = GetMain(); 241 MainThreadData& main = GetMain();
242 main.mirrored_compositor->ScheduleFullRedraw(); 242 main.mirrored_compositor->ScheduleFullRedraw();
243 } 243 }
244 244
245 } // namespace content 245 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/compositor/onscreen_display_client.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698