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

Side by Side Diff: components/mus/public/cpp/lib/output_surface.cc

Issue 1435133004: cc: Clean up max frames/swaps pending usage. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 1 month 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 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 "components/mus/public/cpp/output_surface.h" 5 #include "components/mus/public/cpp/output_surface.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "cc/output/compositor_frame.h" 8 #include "cc/output/compositor_frame.h"
9 #include "cc/output/compositor_frame_ack.h" 9 #include "cc/output/compositor_frame_ack.h"
10 #include "cc/output/output_surface_client.h" 10 #include "cc/output/output_surface_client.h"
11 #include "components/mus/public/cpp/window_surface.h" 11 #include "components/mus/public/cpp/window_surface.h"
12 #include "mojo/converters/surfaces/surfaces_type_converters.h" 12 #include "mojo/converters/surfaces/surfaces_type_converters.h"
13 13
14 namespace mus { 14 namespace mus {
15 15
16 OutputSurface::OutputSurface( 16 OutputSurface::OutputSurface(
17 const scoped_refptr<cc::ContextProvider>& context_provider, 17 const scoped_refptr<cc::ContextProvider>& context_provider,
18 scoped_ptr<mus::WindowSurface> surface) 18 scoped_ptr<mus::WindowSurface> surface)
19 : cc::OutputSurface(context_provider), surface_(surface.Pass()) { 19 : cc::OutputSurface(context_provider), surface_(surface.Pass()) {
20 capabilities_.delegated_rendering = true; 20 capabilities_.delegated_rendering = true;
21 capabilities_.max_frames_pending = 1;
22 } 21 }
23 22
24 OutputSurface::~OutputSurface() {} 23 OutputSurface::~OutputSurface() {}
25 24
26 bool OutputSurface::BindToClient(cc::OutputSurfaceClient* client) { 25 bool OutputSurface::BindToClient(cc::OutputSurfaceClient* client) {
27 surface_->BindToThread(); 26 surface_->BindToThread();
28 surface_->set_client(this); 27 surface_->set_client(this);
29 return cc::OutputSurface::BindToClient(client); 28 return cc::OutputSurface::BindToClient(client);
30 } 29 }
31 30
(...skipping 19 matching lines...) Expand all
51 cc::CompositorFrameAck cfa; 50 cc::CompositorFrameAck cfa;
52 cfa.resources = resources.To<cc::ReturnedResourceArray>(); 51 cfa.resources = resources.To<cc::ReturnedResourceArray>();
53 ReclaimResources(&cfa); 52 ReclaimResources(&cfa);
54 } 53 }
55 54
56 void OutputSurface::SwapBuffersComplete() { 55 void OutputSurface::SwapBuffersComplete() {
57 client_->DidSwapBuffersComplete(); 56 client_->DidSwapBuffersComplete();
58 } 57 }
59 58
60 } // namespace mus 59 } // namespace mus
OLDNEW
« no previous file with comments | « cc/trees/thread_proxy.cc ('k') | content/browser/compositor/browser_compositor_output_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698