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

Unified Diff: content/renderer/child_frame_compositing_helper.cc

Issue 503083003: Remove implicit conversions from scoped_refptr to T* in content/renderer/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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
Index: content/renderer/child_frame_compositing_helper.cc
diff --git a/content/renderer/child_frame_compositing_helper.cc b/content/renderer/child_frame_compositing_helper.cc
index 5e921cbbbe33e0eb44ac3073a5762b361e562994..d5dbc5be9c2b52ebf1f020126451c0fcfba3df2f 100644
--- a/content/renderer/child_frame_compositing_helper.cc
+++ b/content/renderer/child_frame_compositing_helper.cc
@@ -140,7 +140,7 @@ void ChildFrameCompositingHelper::CopyFromCompositingSurface(
int request_id,
gfx::Rect source_rect,
gfx::Size dest_size) {
- CHECK(background_layer_);
+ CHECK(background_layer_.get());
scoped_ptr<cc::CopyOutputRequest> request =
cc::CopyOutputRequest::CreateBitmapRequest(base::Bind(
&ChildFrameCompositingHelper::CopyFromCompositingSurfaceHasResult,
@@ -276,7 +276,7 @@ void ChildFrameCompositingHelper::OnContainerDestroy() {
if (GetContainer())
GetContainer()->setWebLayer(NULL);
- if (resource_collection_)
+ if (resource_collection_.get())
resource_collection_->SetClient(NULL);
ack_pending_ = false;
@@ -448,7 +448,7 @@ void ChildFrameCompositingHelper::OnCompositorFrameSwapped(
cc::DelegatedFrameData* frame_data = frame->delegated_frame_data.get();
// Do nothing if we are getting destroyed or have no frame data.
- if (!frame_data || !background_layer_)
+ if (!frame_data || !background_layer_.get())
return;
DCHECK(!frame_data->render_pass_list.empty());
@@ -468,7 +468,7 @@ void ChildFrameCompositingHelper::OnCompositorFrameSwapped(
// Drop the cc::DelegatedFrameResourceCollection so that we will not return
// any resources from the old output surface with the new output surface id.
- if (resource_collection_) {
+ if (resource_collection_.get()) {
resource_collection_->SetClient(NULL);
if (resource_collection_->LoseAllResources())
@@ -479,7 +479,7 @@ void ChildFrameCompositingHelper::OnCompositorFrameSwapped(
last_route_id_ = route_id;
last_host_id_ = host_id;
}
- if (!resource_collection_) {
+ if (!resource_collection_.get()) {
resource_collection_ = new cc::DelegatedFrameResourceCollection;
resource_collection_->SetClient(this);
}
@@ -521,7 +521,7 @@ void ChildFrameCompositingHelper::UnusedResourcesAreAvailable() {
void ChildFrameCompositingHelper::SendReturnedDelegatedResources() {
FrameHostMsg_ReclaimCompositorResources_Params params;
- if (resource_collection_)
+ if (resource_collection_.get())
resource_collection_->TakeUnusedResourcesForChildCompositor(
&params.ack.resources);
DCHECK(!params.ack.resources.empty());
« no previous file with comments | « content/renderer/browser_plugin/browser_plugin.cc ('k') | content/renderer/gpu/queue_message_swap_promise_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698