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

Side by Side Diff: android_webview/browser/hardware_renderer.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
« no previous file with comments | « no previous file | cc/ipc/mojo_compositor_frame_sink.mojom » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "android_webview/browser/hardware_renderer.h" 5 #include "android_webview/browser/hardware_renderer.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "android_webview/browser/aw_gl_surface.h" 9 #include "android_webview/browser/aw_gl_surface.h"
10 #include "android_webview/browser/aw_render_thread_context_provider.h" 10 #include "android_webview/browser/aw_render_thread_context_provider.h"
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 void HardwareRenderer::AllocateSurface() { 160 void HardwareRenderer::AllocateSurface() {
161 DCHECK(!child_id_.is_valid()); 161 DCHECK(!child_id_.is_valid());
162 child_id_ = local_surface_id_allocator_->GenerateId(); 162 child_id_ = local_surface_id_allocator_->GenerateId();
163 surfaces_->AddChildId(cc::SurfaceId(frame_sink_id_, child_id_)); 163 surfaces_->AddChildId(cc::SurfaceId(frame_sink_id_, child_id_));
164 } 164 }
165 165
166 void HardwareRenderer::DestroySurface() { 166 void HardwareRenderer::DestroySurface() {
167 DCHECK(child_id_.is_valid()); 167 DCHECK(child_id_.is_valid());
168 168
169 surfaces_->RemoveChildId(cc::SurfaceId(frame_sink_id_, child_id_)); 169 surfaces_->RemoveChildId(cc::SurfaceId(frame_sink_id_, child_id_));
170 support_->EvictFrame(); 170 support_->EvictCurrentSurface();
171 child_id_ = cc::LocalSurfaceId(); 171 child_id_ = cc::LocalSurfaceId();
172 } 172 }
173 173
174 void HardwareRenderer::DidReceiveCompositorFrameAck( 174 void HardwareRenderer::DidReceiveCompositorFrameAck(
175 const cc::ReturnedResourceArray& resources) { 175 const cc::ReturnedResourceArray& resources) {
176 ReturnResourcesToCompositor(resources, compositor_id_, 176 ReturnResourcesToCompositor(resources, compositor_id_,
177 last_submitted_compositor_frame_sink_id_); 177 last_submitted_compositor_frame_sink_id_);
178 } 178 }
179 179
180 void HardwareRenderer::OnBeginFrame(const cc::BeginFrameArgs& args) { 180 void HardwareRenderer::OnBeginFrame(const cc::BeginFrameArgs& args) {
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 constexpr bool is_root = false; 257 constexpr bool is_root = false;
258 constexpr bool handles_frame_sink_id_invalidation = false; 258 constexpr bool handles_frame_sink_id_invalidation = false;
259 constexpr bool needs_sync_points = true; 259 constexpr bool needs_sync_points = true;
260 support_.reset(); 260 support_.reset();
261 support_ = cc::CompositorFrameSinkSupport::Create( 261 support_ = cc::CompositorFrameSinkSupport::Create(
262 this, surfaces_->GetSurfaceManager(), frame_sink_id_, is_root, 262 this, surfaces_->GetSurfaceManager(), frame_sink_id_, is_root,
263 handles_frame_sink_id_invalidation, needs_sync_points); 263 handles_frame_sink_id_invalidation, needs_sync_points);
264 } 264 }
265 265
266 } // namespace android_webview 266 } // namespace android_webview
OLDNEW
« no previous file with comments | « no previous file | cc/ipc/mojo_compositor_frame_sink.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698