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

Side by Side Diff: cc/output/output_surface.cc

Issue 2061993003: Pass responsibility for IOSurface-texture reuse to the gpu process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@temp85_query_in_use
Patch Set: Rebase. Created 4 years, 6 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 | « cc/output/output_surface.h ('k') | cc/output/output_surface_client.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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "cc/output/output_surface.h" 5 #include "cc/output/output_surface.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 FROM_HERE, base::Bind(&OutputSurface::OnSwapBuffersComplete, 241 FROM_HERE, base::Bind(&OutputSurface::OnSwapBuffersComplete,
242 weak_ptr_factory_.GetWeakPtr())); 242 weak_ptr_factory_.GetWeakPtr()));
243 } 243 }
244 244
245 // We don't post tasks bound to the client directly since they might run 245 // We don't post tasks bound to the client directly since they might run
246 // after the OutputSurface has been destroyed. 246 // after the OutputSurface has been destroyed.
247 void OutputSurface::OnSwapBuffersComplete() { 247 void OutputSurface::OnSwapBuffersComplete() {
248 client_->DidSwapBuffersComplete(); 248 client_->DidSwapBuffersComplete();
249 } 249 }
250 250
251 void OutputSurface::DidReceiveTextureInUseResponses(
252 const gpu::TextureInUseResponses& responses) {
253 client_->DidReceiveTextureInUseResponses(responses);
254 }
255
251 void OutputSurface::SetMemoryPolicy(const ManagedMemoryPolicy& policy) { 256 void OutputSurface::SetMemoryPolicy(const ManagedMemoryPolicy& policy) {
252 TRACE_EVENT1("cc", "OutputSurface::SetMemoryPolicy", 257 TRACE_EVENT1("cc", "OutputSurface::SetMemoryPolicy",
253 "bytes_limit_when_visible", policy.bytes_limit_when_visible); 258 "bytes_limit_when_visible", policy.bytes_limit_when_visible);
254 // Just ignore the memory manager when it says to set the limit to zero 259 // Just ignore the memory manager when it says to set the limit to zero
255 // bytes. This will happen when the memory manager thinks that the renderer 260 // bytes. This will happen when the memory manager thinks that the renderer
256 // is not visible (which the renderer knows better). 261 // is not visible (which the renderer knows better).
257 if (policy.bytes_limit_when_visible) 262 if (policy.bytes_limit_when_visible)
258 client_->SetMemoryPolicy(policy); 263 client_->SetMemoryPolicy(policy);
259 } 264 }
260 265
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 if (context_provider_.get()) { 333 if (context_provider_.get()) {
329 context_provider_->SetLostContextCallback( 334 context_provider_->SetLostContextCallback(
330 ContextProvider::LostContextCallback()); 335 ContextProvider::LostContextCallback());
331 } 336 }
332 context_provider_ = nullptr; 337 context_provider_ = nullptr;
333 client_ = nullptr; 338 client_ = nullptr;
334 weak_ptr_factory_.InvalidateWeakPtrs(); 339 weak_ptr_factory_.InvalidateWeakPtrs();
335 } 340 }
336 341
337 } // namespace cc 342 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/output_surface.h ('k') | cc/output/output_surface_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698