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

Side by Side Diff: gpu/ipc/service/ca_layer_tree_mac.mm

Issue 1859703002: convert //gpu to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on master Created 4 years, 8 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 | « gpu/ipc/service/ca_layer_tree_mac.h ('k') | gpu/ipc/service/ca_layer_tree_unittest_mac.mm » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "gpu/ipc/service/ca_layer_tree_mac.h" 5 #include "gpu/ipc/service/ca_layer_tree_mac.h"
6 6
7 #include <AVFoundation/AVFoundation.h> 7 #include <AVFoundation/AVFoundation.h>
8 #include <CoreMedia/CoreMedia.h> 8 #include <CoreMedia/CoreMedia.h>
9 #include <CoreVideo/CoreVideo.h> 9 #include <CoreVideo/CoreVideo.h>
10 10
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 if (has_committed_) { 136 if (has_committed_) {
137 LOG(ERROR) << "ScheduleCALayer called after CommitScheduledCALayers."; 137 LOG(ERROR) << "ScheduleCALayer called after CommitScheduledCALayers.";
138 return false; 138 return false;
139 } 139 }
140 return root_layer_.AddContentLayer(is_clipped, clip_rect, sorting_context_id, 140 return root_layer_.AddContentLayer(is_clipped, clip_rect, sorting_context_id,
141 transform, io_surface, contents_rect, rect, 141 transform, io_surface, contents_rect, rect,
142 background_color, edge_aa_mask, opacity); 142 background_color, edge_aa_mask, opacity);
143 } 143 }
144 144
145 void CALayerTree::CommitScheduledCALayers(CALayer* superlayer, 145 void CALayerTree::CommitScheduledCALayers(CALayer* superlayer,
146 scoped_ptr<CALayerTree> old_tree, 146 std::unique_ptr<CALayerTree> old_tree,
147 float scale_factor) { 147 float scale_factor) {
148 TRACE_EVENT0("gpu", "CALayerTree::CommitScheduledCALayers"); 148 TRACE_EVENT0("gpu", "CALayerTree::CommitScheduledCALayers");
149 RootLayer* old_root_layer = nullptr; 149 RootLayer* old_root_layer = nullptr;
150 if (old_tree) { 150 if (old_tree) {
151 DCHECK(old_tree->has_committed_); 151 DCHECK(old_tree->has_committed_);
152 if (old_tree->scale_factor_ == scale_factor) 152 if (old_tree->scale_factor_ == scale_factor)
153 old_root_layer = &old_tree->root_layer_; 153 old_root_layer = &old_tree->root_layer_;
154 } 154 }
155 155
156 root_layer_.CommitToCA(superlayer, old_root_layer, scale_factor); 156 root_layer_.CommitToCA(superlayer, old_root_layer, scale_factor);
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 } else { 562 } else {
563 // Grey represents a CALayer that has not changed. 563 // Grey represents a CALayer that has not changed.
564 color.reset(CGColorCreateGenericRGB(0, 0, 0, 0.1)); 564 color.reset(CGColorCreateGenericRGB(0, 0, 0, 0.1));
565 } 565 }
566 [ca_layer setBorderWidth:1]; 566 [ca_layer setBorderWidth:1];
567 [ca_layer setBorderColor:color]; 567 [ca_layer setBorderColor:color];
568 } 568 }
569 } 569 }
570 570
571 } // namespace gpu 571 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/ipc/service/ca_layer_tree_mac.h ('k') | gpu/ipc/service/ca_layer_tree_unittest_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698