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

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

Issue 432093003: Enqueuing new frames in a Surface should cause Displays to reaggregate it (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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
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/output/compositor_frame_ack.h" 8 #include "cc/output/compositor_frame_ack.h"
9 #include "cc/surfaces/display.h" 9 #include "cc/surfaces/display.h"
10 #include "cc/surfaces/surface.h" 10 #include "cc/surfaces/surface.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 surface_id_ = allocator_.GenerateId(); 43 surface_id_ = allocator_.GenerateId();
44 factory_.Create(surface_id_, frame_size); 44 factory_.Create(surface_id_, frame_size);
45 display_size_ = frame_size; 45 display_size_ = frame_size;
46 display_->Resize(surface_id_, frame_size); 46 display_->Resize(surface_id_, frame_size);
47 } 47 }
48 48
49 scoped_ptr<cc::CompositorFrame> frame_copy(new cc::CompositorFrame()); 49 scoped_ptr<cc::CompositorFrame> frame_copy(new cc::CompositorFrame());
50 frame->AssignTo(frame_copy.get()); 50 frame->AssignTo(frame_copy.get());
51 factory_.SubmitFrame(surface_id_, frame_copy.Pass()); 51 factory_.SubmitFrame(surface_id_, frame_copy.Pass());
52 52
53 if (!display_->Draw())
54 return;
55
56 client_->DidSwapBuffers(); 53 client_->DidSwapBuffers();
57 client_->DidSwapBuffersComplete(); 54 client_->DidSwapBuffersComplete();
58 } 55 }
59 56
60 void SurfaceDisplayOutputSurface::ReturnResources( 57 void SurfaceDisplayOutputSurface::ReturnResources(
61 const cc::ReturnedResourceArray& resources) { 58 const cc::ReturnedResourceArray& resources) {
62 cc::CompositorFrameAck ack; 59 cc::CompositorFrameAck ack;
63 ack.resources = resources; 60 ack.resources = resources;
64 if (client_) 61 if (client_)
65 client_->ReclaimResources(&ack); 62 client_->ReclaimResources(&ack);
66 } 63 }
67 64
68 } // namespace content 65 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/compositor/onscreen_display_client.cc ('k') | mojo/services/surfaces/surfaces_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698