| OLD | NEW | 
|---|
| 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 "cc/surfaces/surface_display_output_surface.h" | 5 #include "cc/surfaces/surface_display_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/surfaces/display.h" | 10 #include "cc/surfaces/display.h" | 
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 117   // Unregister the SurfaceFactoryClient here instead of the dtor so that only | 117   // Unregister the SurfaceFactoryClient here instead of the dtor so that only | 
| 118   // one client is alive for this namespace at any given time. | 118   // one client is alive for this namespace at any given time. | 
| 119   surface_manager_->UnregisterSurfaceFactoryClient( | 119   surface_manager_->UnregisterSurfaceFactoryClient( | 
| 120       surface_id_allocator_->id_namespace()); | 120       surface_id_allocator_->id_namespace()); | 
| 121   if (!delegated_surface_id_.is_null()) | 121   if (!delegated_surface_id_.is_null()) | 
| 122     factory_.Destroy(delegated_surface_id_); | 122     factory_.Destroy(delegated_surface_id_); | 
| 123 | 123 | 
| 124   OutputSurface::DetachFromClient(); | 124   OutputSurface::DetachFromClient(); | 
| 125 } | 125 } | 
| 126 | 126 | 
|  | 127 void SurfaceDisplayOutputSurface::BindFramebuffer() { | 
|  | 128   // This is a delegating output surface, no framebuffer/direct drawing support. | 
|  | 129   NOTREACHED(); | 
|  | 130 } | 
|  | 131 | 
|  | 132 uint32_t SurfaceDisplayOutputSurface::GetFramebufferCopyTextureFormat() { | 
|  | 133   // This is a delegating output surface, no framebuffer/direct drawing support. | 
|  | 134   NOTREACHED(); | 
|  | 135   return 0; | 
|  | 136 } | 
|  | 137 | 
| 127 void SurfaceDisplayOutputSurface::ReturnResources( | 138 void SurfaceDisplayOutputSurface::ReturnResources( | 
| 128     const ReturnedResourceArray& resources) { | 139     const ReturnedResourceArray& resources) { | 
| 129   CompositorFrameAck ack; | 140   CompositorFrameAck ack; | 
| 130   ack.resources = resources; | 141   ack.resources = resources; | 
| 131   if (client_) | 142   if (client_) | 
| 132     client_->ReclaimResources(&ack); | 143     client_->ReclaimResources(&ack); | 
| 133 } | 144 } | 
| 134 | 145 | 
| 135 void SurfaceDisplayOutputSurface::SetBeginFrameSource( | 146 void SurfaceDisplayOutputSurface::SetBeginFrameSource( | 
| 136     BeginFrameSource* begin_frame_source) { | 147     BeginFrameSource* begin_frame_source) { | 
| (...skipping 11 matching lines...) Expand all  Loading... | 
| 148   SetMemoryPolicy(policy); | 159   SetMemoryPolicy(policy); | 
| 149 } | 160 } | 
| 150 | 161 | 
| 151 void SurfaceDisplayOutputSurface::SwapBuffersComplete(SurfaceDrawStatus drawn) { | 162 void SurfaceDisplayOutputSurface::SwapBuffersComplete(SurfaceDrawStatus drawn) { | 
| 152   // TODO(danakj): Why the lost check? | 163   // TODO(danakj): Why the lost check? | 
| 153   if (!output_surface_lost_) | 164   if (!output_surface_lost_) | 
| 154     client_->DidSwapBuffersComplete(); | 165     client_->DidSwapBuffersComplete(); | 
| 155 } | 166 } | 
| 156 | 167 | 
| 157 }  // namespace cc | 168 }  // namespace cc | 
| OLD | NEW | 
|---|