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

Side by Side Diff: content/renderer/android/synchronous_compositor_output_surface.cc

Issue 2329623003: cc: Remove unneeded methods from OutputSurface. (Closed)
Patch Set: superandroid Created 4 years, 3 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 "content/renderer/android/synchronous_compositor_output_surface.h" 5 #include "content/renderer/android/synchronous_compositor_output_surface.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 } 355 }
356 } 356 }
357 357
358 void SynchronousCompositorOutputSurface::OnReclaimResources( 358 void SynchronousCompositorOutputSurface::OnReclaimResources(
359 uint32_t output_surface_id, 359 uint32_t output_surface_id,
360 const cc::ReturnedResourceArray& resources) { 360 const cc::ReturnedResourceArray& resources) {
361 // Ignore message if it's a stale one coming from a different output surface 361 // Ignore message if it's a stale one coming from a different output surface
362 // (e.g. after a lost context). 362 // (e.g. after a lost context).
363 if (output_surface_id != output_surface_id_) 363 if (output_surface_id != output_surface_id_)
364 return; 364 return;
365 ReclaimResources(resources); 365 client_->ReclaimResources(resources);
366 } 366 }
367 367
368 void SynchronousCompositorOutputSurface::SetMemoryPolicy(size_t bytes_limit) { 368 void SynchronousCompositorOutputSurface::SetMemoryPolicy(size_t bytes_limit) {
369 DCHECK(CalledOnValidThread()); 369 DCHECK(CalledOnValidThread());
370 bool became_zero = memory_policy_.bytes_limit_when_visible && !bytes_limit; 370 bool became_zero = memory_policy_.bytes_limit_when_visible && !bytes_limit;
371 bool became_non_zero = 371 bool became_non_zero =
372 !memory_policy_.bytes_limit_when_visible && bytes_limit; 372 !memory_policy_.bytes_limit_when_visible && bytes_limit;
373 memory_policy_.bytes_limit_when_visible = bytes_limit; 373 memory_policy_.bytes_limit_when_visible = bytes_limit;
374 memory_policy_.num_resources_limit = kNumResourcesLimit; 374 memory_policy_.num_resources_limit = kNumResourcesLimit;
375 375
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 client_->ReclaimResources(resources); 419 client_->ReclaimResources(resources);
420 } 420 }
421 421
422 void SynchronousCompositorOutputSurface::SetBeginFrameSource( 422 void SynchronousCompositorOutputSurface::SetBeginFrameSource(
423 cc::BeginFrameSource* begin_frame_source) { 423 cc::BeginFrameSource* begin_frame_source) {
424 // Software output is synchronous and doesn't use a BeginFrameSource. 424 // Software output is synchronous and doesn't use a BeginFrameSource.
425 NOTREACHED(); 425 NOTREACHED();
426 } 426 }
427 427
428 } // namespace content 428 } // namespace content
OLDNEW
« no previous file with comments | « cc/test/test_delegating_output_surface.cc ('k') | content/renderer/gpu/compositor_output_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698