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

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

Issue 1845563005: Refactor content/common/gpu into gpu/ipc/service (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Drop ref to deleted content_tests_gypi_values.content_unittests_ozone_sources 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_partial_damage_tree_mac.h ('k') | gpu/ipc/service/ca_layer_tree_mac.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 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 "content/common/gpu/ca_layer_partial_damage_tree_mac.h" 5 #include "gpu/ipc/service/ca_layer_partial_damage_tree_mac.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/mac/scoped_nsobject.h" 8 #include "base/mac/scoped_nsobject.h"
9 #include "base/mac/sdk_forward_declarations.h" 9 #include "base/mac/sdk_forward_declarations.h"
10 #include "base/trace_event/trace_event.h" 10 #include "base/trace_event/trace_event.h"
11 #include "ui/base/ui_base_switches.h" 11 #include "ui/base/ui_base_switches.h"
12 #include "ui/gfx/transform.h" 12 #include "ui/gfx/transform.h"
13 13
14 @interface CALayer(Private) 14 @interface CALayer(Private)
15 -(void)setContentsChanged; 15 -(void)setContentsChanged;
16 @end 16 @end
17 17
18 namespace content { 18 namespace gpu {
19 namespace { 19 namespace {
20 20
21 // When selecting a CALayer to re-use for partial damage, this is the maximum 21 // When selecting a CALayer to re-use for partial damage, this is the maximum
22 // fraction of the merged layer's pixels that may be not-updated by the swap 22 // fraction of the merged layer's pixels that may be not-updated by the swap
23 // before we consider the CALayer to not be a good enough match, and create a 23 // before we consider the CALayer to not be a good enough match, and create a
24 // new one. 24 // new one.
25 const float kMaximumPartialDamageWasteFraction = 1.2f; 25 const float kMaximumPartialDamageWasteFraction = 1.2f;
26 26
27 // The maximum number of partial damage layers that may be created before we 27 // The maximum number of partial damage layers that may be created before we
28 // give up and remove them all (doing full damage in the process). 28 // give up and remove them all (doing full damage in the process).
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 void CALayerPartialDamageTree::CommitCALayers( 277 void CALayerPartialDamageTree::CommitCALayers(
278 CALayer* superlayer, 278 CALayer* superlayer,
279 scoped_ptr<CALayerPartialDamageTree> old_tree, 279 scoped_ptr<CALayerPartialDamageTree> old_tree,
280 float scale_factor, 280 float scale_factor,
281 const gfx::Rect& pixel_damage_rect) { 281 const gfx::Rect& pixel_damage_rect) {
282 TRACE_EVENT0("gpu", "CALayerPartialDamageTree::CommitCALayers"); 282 TRACE_EVENT0("gpu", "CALayerPartialDamageTree::CommitCALayers");
283 UpdateRootAndPartialDamagePlanes(std::move(old_tree), pixel_damage_rect); 283 UpdateRootAndPartialDamagePlanes(std::move(old_tree), pixel_damage_rect);
284 UpdateCALayers(superlayer, scale_factor); 284 UpdateCALayers(superlayer, scale_factor);
285 } 285 }
286 286
287 } // namespace content 287 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/ipc/service/ca_layer_partial_damage_tree_mac.h ('k') | gpu/ipc/service/ca_layer_tree_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698