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

Side by Side Diff: android_webview/browser/parent_output_surface.cc

Issue 2143263002: cc: Remove OutputSurfaceClient::DidSwapBuffers(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removedidswap: fix-webview-swap Created 4 years, 5 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
« no previous file with comments | « no previous file | blimp/client/feature/compositor/blimp_output_surface.cc » ('j') | 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 "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 "cc/output/compositor_frame.h" 8 #include "cc/output/compositor_frame.h"
9 #include "cc/output/output_surface_client.h" 9 #include "cc/output/output_surface_client.h"
10 #include "gpu/command_buffer/client/gles2_interface.h" 10 #include "gpu/command_buffer/client/gles2_interface.h"
(...skipping 17 matching lines...) Expand all
28 void ParentOutputSurface::Reshape(const gfx::Size& size, 28 void ParentOutputSurface::Reshape(const gfx::Size& size,
29 float scale_factor, 29 float scale_factor,
30 const gfx::ColorSpace& color_space, 30 const gfx::ColorSpace& color_space,
31 bool has_alpha) { 31 bool has_alpha) {
32 DCHECK_EQ(1.f, scale_factor); 32 DCHECK_EQ(1.f, scale_factor);
33 surface_size_ = size; 33 surface_size_ = size;
34 } 34 }
35 35
36 void ParentOutputSurface::SwapBuffers(cc::CompositorFrame frame) { 36 void ParentOutputSurface::SwapBuffers(cc::CompositorFrame frame) {
37 context_provider_->ContextGL()->ShallowFlushCHROMIUM(); 37 context_provider_->ContextGL()->ShallowFlushCHROMIUM();
38 client_->DidSwapBuffers();
39 } 38 }
40 39
41 void ParentOutputSurface::ApplyExternalStencil() { 40 void ParentOutputSurface::ApplyExternalStencil() {
42 DCHECK(stencil_state_.stencil_test_enabled); 41 DCHECK(stencil_state_.stencil_test_enabled);
43 gpu::gles2::GLES2Interface* gl = context_provider()->ContextGL(); 42 gpu::gles2::GLES2Interface* gl = context_provider()->ContextGL();
44 gl->StencilFuncSeparate(GL_FRONT, stencil_state_.stencil_front_func, 43 gl->StencilFuncSeparate(GL_FRONT, stencil_state_.stencil_front_func,
45 stencil_state_.stencil_front_mask, 44 stencil_state_.stencil_front_mask,
46 stencil_state_.stencil_front_ref); 45 stencil_state_.stencil_front_ref);
47 gl->StencilFuncSeparate(GL_BACK, stencil_state_.stencil_back_func, 46 gl->StencilFuncSeparate(GL_BACK, stencil_state_.stencil_back_func,
48 stencil_state_.stencil_back_mask, 47 stencil_state_.stencil_back_mask,
(...skipping 12 matching lines...) Expand all
61 auto* gl = static_cast<AwRenderThreadContextProvider*>(context_provider()); 60 auto* gl = static_cast<AwRenderThreadContextProvider*>(context_provider());
62 return gl->GetCopyTextureInternalFormat(); 61 return gl->GetCopyTextureInternalFormat();
63 } 62 }
64 63
65 void ParentOutputSurface::SetGLState(const ScopedAppGLStateRestore& gl_state) { 64 void ParentOutputSurface::SetGLState(const ScopedAppGLStateRestore& gl_state) {
66 stencil_state_ = gl_state.stencil_state(); 65 stencil_state_ = gl_state.stencil_state();
67 SetExternalStencilTest(stencil_state_.stencil_test_enabled); 66 SetExternalStencilTest(stencil_state_.stencil_test_enabled);
68 } 67 }
69 68
70 } // namespace android_webview 69 } // namespace android_webview
OLDNEW
« no previous file with comments | « no previous file | blimp/client/feature/compositor/blimp_output_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698