| OLD | NEW | 
|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/test/pixel_test_delegating_output_surface.h" | 5 #include "cc/test/pixel_test_delegating_output_surface.h" | 
| 6 | 6 | 
| 7 #include <stdint.h> | 7 #include <stdint.h> | 
| 8 #include <memory> | 8 #include <memory> | 
| 9 #include <utility> | 9 #include <utility> | 
| 10 | 10 | 
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 155   client_->DidSwapBuffersComplete(); | 155   client_->DidSwapBuffersComplete(); | 
| 156 } | 156 } | 
| 157 | 157 | 
| 158 void PixelTestDelegatingOutputSurface::ForceReclaimResources() { | 158 void PixelTestDelegatingOutputSurface::ForceReclaimResources() { | 
| 159   if (allow_force_reclaim_resources_ && !delegated_surface_id_.is_null()) { | 159   if (allow_force_reclaim_resources_ && !delegated_surface_id_.is_null()) { | 
| 160     surface_factory_->SubmitCompositorFrame(delegated_surface_id_, nullptr, | 160     surface_factory_->SubmitCompositorFrame(delegated_surface_id_, nullptr, | 
| 161                                             SurfaceFactory::DrawCallback()); | 161                                             SurfaceFactory::DrawCallback()); | 
| 162   } | 162   } | 
| 163 } | 163 } | 
| 164 | 164 | 
|  | 165 void PixelTestDelegatingOutputSurface::BindFramebuffer() { | 
|  | 166   // This is a delegating output surface, no framebuffer/direct drawing support. | 
|  | 167   NOTREACHED(); | 
|  | 168 } | 
|  | 169 | 
|  | 170 uint32_t PixelTestDelegatingOutputSurface::GetFramebufferCopyTextureFormat() { | 
|  | 171   // This is a delegating output surface, no framebuffer/direct drawing support. | 
|  | 172   NOTREACHED(); | 
|  | 173   return 0; | 
|  | 174 } | 
|  | 175 | 
| 165 void PixelTestDelegatingOutputSurface::ReturnResources( | 176 void PixelTestDelegatingOutputSurface::ReturnResources( | 
| 166     const ReturnedResourceArray& resources) { | 177     const ReturnedResourceArray& resources) { | 
| 167   CompositorFrameAck ack; | 178   CompositorFrameAck ack; | 
| 168   ack.resources = resources; | 179   ack.resources = resources; | 
| 169   client_->ReclaimResources(&ack); | 180   client_->ReclaimResources(&ack); | 
| 170 } | 181 } | 
| 171 | 182 | 
| 172 void PixelTestDelegatingOutputSurface::SetBeginFrameSource( | 183 void PixelTestDelegatingOutputSurface::SetBeginFrameSource( | 
| 173     BeginFrameSource* begin_frame_source) { | 184     BeginFrameSource* begin_frame_source) { | 
| 174   client_->SetBeginFrameSource(begin_frame_source); | 185   client_->SetBeginFrameSource(begin_frame_source); | 
| 175 } | 186 } | 
| 176 | 187 | 
| 177 }  // namespace cc | 188 }  // namespace cc | 
| OLD | NEW | 
|---|