Commit 9a9014a5 authored by ccameron's avatar ccameron Committed by Commit bot

Mac overlays: Move CALayerPartialDamageTree to its own file

Direct copy-paste, no changes.

BUG=533681
TBR=erikchen

Review URL: https://codereview.chromium.org/1647523002

Cr-Commit-Position: refs/heads/master@{#371871}
parent bb3eaacc
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CONTENT_COMMON_GPU_CA_LAYER_PARTIAL_DAMAGE_TREE_MAC_H_
#define CONTENT_COMMON_GPU_CA_LAYER_PARTIAL_DAMAGE_TREE_MAC_H_
#include <IOSurface/IOSurface.h>
#include <QuartzCore/QuartzCore.h>
#include <deque>
#include "base/mac/scoped_cftyperef.h"
#include "base/memory/linked_ptr.h"
#include "base/memory/scoped_ptr.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/rect_f.h"
namespace content {
class CALayerPartialDamageTree {
public:
CALayerPartialDamageTree(bool allow_partial_swap,
base::ScopedCFTypeRef<IOSurfaceRef> io_surface,
const gfx::Rect& pixel_frame_rect);
~CALayerPartialDamageTree();
base::ScopedCFTypeRef<IOSurfaceRef> RootLayerIOSurface();
void CommitCALayers(CALayer* superlayer,
scoped_ptr<CALayerPartialDamageTree> old_tree,
float scale_factor,
const gfx::Rect& pixel_damage_rect);
private:
class OverlayPlane;
void UpdateRootAndPartialDamagePlanes(CALayerPartialDamageTree* old_tree,
const gfx::RectF& pixel_damage_rect);
void UpdateRootAndPartialDamageCALayers(CALayer* superlayer,
float scale_factor);
const bool allow_partial_swap_;
linked_ptr<OverlayPlane> root_plane_;
std::deque<linked_ptr<OverlayPlane>> partial_damage_planes_;
};
} // content
#endif // CONTENT_COMMON_GPU_CA_LAYER_PARTIAL_DAMAGE_TREE_MAC_H_
This diff is collapsed.
......@@ -8,7 +8,6 @@
#include <list>
#include <vector>
#include "base/memory/linked_ptr.h"
#import "base/mac/scoped_nsobject.h"
#include "base/timer/timer.h"
#include "content/common/gpu/gpu_command_buffer_stub.h"
......
......@@ -324,6 +324,8 @@
'common/gpu/client/grcontext_for_webgraphicscontext3d.h',
'common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc',
'common/gpu/client/webgraphicscontext3d_command_buffer_impl.h',
'common/gpu/ca_layer_partial_damage_tree_mac.h',
'common/gpu/ca_layer_partial_damage_tree_mac.mm',
'common/gpu/ca_layer_tree_mac.h',
'common/gpu/ca_layer_tree_mac.mm',
'common/gpu/child_window_surface_win.cc',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment