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

Side by Side Diff: content/browser/compositor/surface_display_output_surface.cc

Issue 303113007: Add software renderer support for surfaces. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « content/browser/compositor/surface_display_output_surface.h ('k') | no next file » | 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 "content/browser/compositor/surface_display_output_surface.h" 5 #include "content/browser/compositor/surface_display_output_surface.h"
6 6
7 #include "cc/output/compositor_frame.h" 7 #include "cc/output/compositor_frame.h"
8 #include "cc/surfaces/display.h" 8 #include "cc/surfaces/display.h"
9 #include "cc/surfaces/surface.h" 9 #include "cc/surfaces/surface.h"
10 #include "cc/surfaces/surface_manager.h" 10 #include "cc/surfaces/surface_manager.h"
11 11
12 namespace content { 12 namespace content {
13 13
14 SurfaceDisplayOutputSurface::SurfaceDisplayOutputSurface( 14 SurfaceDisplayOutputSurface::SurfaceDisplayOutputSurface(
15 cc::Display* display, 15 cc::Display* display,
16 cc::SurfaceManager* surface_manager, 16 cc::SurfaceManager* surface_manager,
17 const scoped_refptr<cc::ContextProvider>& context_provider, 17 const scoped_refptr<cc::ContextProvider>& context_provider)
18 scoped_ptr<cc::SoftwareOutputDevice> software_device) 18 : cc::OutputSurface(context_provider,
19 : cc::OutputSurface(context_provider, software_device.Pass()), 19 scoped_ptr<cc::SoftwareOutputDevice>()),
20 display_(display), 20 display_(display),
21 surface_manager_(surface_manager) { 21 surface_manager_(surface_manager) {
22 capabilities_.delegated_rendering = true; 22 capabilities_.delegated_rendering = true;
23 capabilities_.max_frames_pending = 1; 23 capabilities_.max_frames_pending = 1;
24 } 24 }
25 25
26 SurfaceDisplayOutputSurface::~SurfaceDisplayOutputSurface() { 26 SurfaceDisplayOutputSurface::~SurfaceDisplayOutputSurface() {
27 } 27 }
28 28
29 void SurfaceDisplayOutputSurface::SwapBuffers(cc::CompositorFrame* frame) { 29 void SurfaceDisplayOutputSurface::SwapBuffers(cc::CompositorFrame* frame) {
(...skipping 10 matching lines...) Expand all
40 surface->QueueFrame(frame_copy.Pass()); 40 surface->QueueFrame(frame_copy.Pass());
41 41
42 if (!display_->Draw()) 42 if (!display_->Draw())
43 return; 43 return;
44 44
45 client_->DidSwapBuffers(); 45 client_->DidSwapBuffers();
46 client_->DidSwapBuffersComplete(); 46 client_->DidSwapBuffersComplete();
47 } 47 }
48 48
49 } // namespace content 49 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/compositor/surface_display_output_surface.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698