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

Side by Side Diff: ui/android/delegated_frame_host_android.cc

Issue 2872883002: Rename EvictFrame, EvictSurface to EvictCurrentSurface (Closed)
Patch Set: Rebase Created 3 years, 7 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
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 "ui/android/delegated_frame_host_android.h" 5 #include "ui/android/delegated_frame_host_android.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "cc/layers/solid_color_layer.h" 10 #include "cc/layers/solid_color_layer.h"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 } 120 }
121 121
122 void DelegatedFrameHostAndroid::DestroyDelegatedContent() { 122 void DelegatedFrameHostAndroid::DestroyDelegatedContent() {
123 if (!surface_info_.is_valid()) 123 if (!surface_info_.is_valid())
124 return; 124 return;
125 125
126 DCHECK(content_layer_); 126 DCHECK(content_layer_);
127 127
128 content_layer_->RemoveFromParent(); 128 content_layer_->RemoveFromParent();
129 content_layer_ = nullptr; 129 content_layer_ = nullptr;
130 support_->EvictFrame(); 130 support_->EvictCurrentSurface();
131 surface_info_ = cc::SurfaceInfo(); 131 surface_info_ = cc::SurfaceInfo();
132 } 132 }
133 133
134 bool DelegatedFrameHostAndroid::HasDelegatedContent() const { 134 bool DelegatedFrameHostAndroid::HasDelegatedContent() const {
135 return surface_info_.is_valid(); 135 return surface_info_.is_valid();
136 } 136 }
137 137
138 void DelegatedFrameHostAndroid::CompositorFrameSinkChanged() { 138 void DelegatedFrameHostAndroid::CompositorFrameSinkChanged() {
139 DestroyDelegatedContent(); 139 DestroyDelegatedContent();
140 CreateNewCompositorFrameSinkSupport(); 140 CreateNewCompositorFrameSinkSupport();
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 support_ = cc::CompositorFrameSinkSupport::Create( 197 support_ = cc::CompositorFrameSinkSupport::Create(
198 this, surface_manager_, frame_sink_id_, is_root, 198 this, surface_manager_, frame_sink_id_, is_root,
199 handles_frame_sink_id_invalidation, needs_sync_points); 199 handles_frame_sink_id_invalidation, needs_sync_points);
200 } 200 }
201 201
202 cc::SurfaceId DelegatedFrameHostAndroid::SurfaceId() const { 202 cc::SurfaceId DelegatedFrameHostAndroid::SurfaceId() const {
203 return surface_info_.id(); 203 return surface_info_.id();
204 } 204 }
205 205
206 } // namespace ui 206 } // namespace ui
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_impl.h ('k') | ui/aura/local/compositor_frame_sink_local.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698