| 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 "android_webview/browser/parent_output_surface.h" |   5 #include "android_webview/browser/parent_output_surface.h" | 
|   6  |   6  | 
|   7 #include "android_webview/browser/aw_render_thread_context_provider.h" |   7 #include "android_webview/browser/aw_render_thread_context_provider.h" | 
|   8 #include "android_webview/browser/scoped_app_gl_state_restore.h" |   8 #include "android_webview/browser/scoped_app_gl_state_restore.h" | 
|   9 #include "cc/output/output_surface_client.h" |   9 #include "cc/output/output_surface_client.h" | 
|  10 #include "cc/output/output_surface_frame.h" |  10 #include "cc/output/output_surface_frame.h" | 
|  11 #include "gpu/command_buffer/client/gles2_interface.h" |  11 #include "gpu/command_buffer/client/gles2_interface.h" | 
|  12  |  12  | 
|  13 namespace android_webview { |  13 namespace android_webview { | 
|  14  |  14  | 
|  15 ParentOutputSurface::ParentOutputSurface( |  15 ParentOutputSurface::ParentOutputSurface( | 
|  16     scoped_refptr<AwRenderThreadContextProvider> context_provider) |  16     scoped_refptr<AwRenderThreadContextProvider> context_provider) | 
|  17     : cc::OutputSurface(std::move(context_provider)) { |  17     : cc::OutputSurface(std::move(context_provider)) { | 
|  18 } |  18 } | 
|  19  |  19  | 
|  20 ParentOutputSurface::~ParentOutputSurface() { |  20 ParentOutputSurface::~ParentOutputSurface() { | 
|  21 } |  21 } | 
|  22  |  22  | 
|  23 void ParentOutputSurface::DidLoseOutputSurface() { |  23 void ParentOutputSurface::BindToClient(cc::OutputSurfaceClient* client) {} | 
|  24   // Android WebView does not handle context loss. |  | 
|  25   LOG(FATAL) << "Render thread context loss"; |  | 
|  26 } |  | 
|  27  |  24  | 
|  28 void ParentOutputSurface::EnsureBackbuffer() {} |  25 void ParentOutputSurface::EnsureBackbuffer() {} | 
|  29  |  26  | 
|  30 void ParentOutputSurface::DiscardBackbuffer() { |  27 void ParentOutputSurface::DiscardBackbuffer() { | 
|  31   context_provider()->ContextGL()->DiscardBackbufferCHROMIUM(); |  28   context_provider()->ContextGL()->DiscardBackbufferCHROMIUM(); | 
|  32 } |  29 } | 
|  33  |  30  | 
|  34 void ParentOutputSurface::BindFramebuffer() { |  31 void ParentOutputSurface::BindFramebuffer() { | 
|  35   context_provider()->ContextGL()->BindFramebuffer(GL_FRAMEBUFFER, 0); |  32   context_provider()->ContextGL()->BindFramebuffer(GL_FRAMEBUFFER, 0); | 
|  36 } |  33 } | 
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  87  |  84  | 
|  88 unsigned ParentOutputSurface::GetOverlayTextureId() const { |  85 unsigned ParentOutputSurface::GetOverlayTextureId() const { | 
|  89   return 0; |  86   return 0; | 
|  90 } |  87 } | 
|  91  |  88  | 
|  92 bool ParentOutputSurface::SurfaceIsSuspendForRecycle() const { |  89 bool ParentOutputSurface::SurfaceIsSuspendForRecycle() const { | 
|  93   return false; |  90   return false; | 
|  94 } |  91 } | 
|  95  |  92  | 
|  96 }  // namespace android_webview |  93 }  // namespace android_webview | 
| OLD | NEW |