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

Unified Diff: android_webview/browser/surfaces_instance.cc

Issue 2375743002: [Merge M54] aw: Fix FBO restore in webview functor (Closed)
Patch Set: Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « android_webview/browser/surfaces_instance.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/browser/surfaces_instance.cc
diff --git a/android_webview/browser/surfaces_instance.cc b/android_webview/browser/surfaces_instance.cc
index 0c856ddb13e05811a9801ad9fcb0ae36ca04ea88..f2ff5104cfe360a05672fae5d7bc2c91d1b7a1e5 100644
--- a/android_webview/browser/surfaces_instance.cc
+++ b/android_webview/browser/surfaces_instance.cc
@@ -39,7 +39,7 @@ scoped_refptr<SurfacesInstance> SurfacesInstance::GetOrCreateInstance() {
}
SurfacesInstance::SurfacesInstance()
- : next_surface_client_id_(1u), gl_surface_(new AwGLSurface) {
+ : next_surface_client_id_(1u) {
cc::RendererSettings settings;
// Should be kept in sync with compositor_impl_android.cc.
@@ -60,7 +60,8 @@ SurfacesInstance::SurfacesInstance()
new cc::TextureMailboxDeleter(nullptr));
std::unique_ptr<ParentOutputSurface> output_surface_holder(
new ParentOutputSurface(AwRenderThreadContextProvider::Create(
- gl_surface_, DeferredGpuCommandService::GetInstance())));
+ make_scoped_refptr(new AwGLSurface),
+ DeferredGpuCommandService::GetInstance())));
output_surface_ = output_surface_holder.get();
std::unique_ptr<cc::DisplayScheduler> scheduler(new cc::DisplayScheduler(
begin_frame_source.get(), nullptr,
@@ -101,17 +102,11 @@ cc::SurfaceManager* SurfacesInstance::GetSurfaceManager() {
return surface_manager_.get();
}
-void SurfacesInstance::SetBackingFrameBufferObject(
- int framebuffer_binding_ext) {
- gl_surface_->SetBackingFrameBufferObject(framebuffer_binding_ext);
-}
-
void SurfacesInstance::DrawAndSwap(const gfx::Size& viewport,
const gfx::Rect& clip,
const gfx::Transform& transform,
const gfx::Size& frame_size,
- const cc::SurfaceId& child_id,
- const ScopedAppGLStateRestore& gl_state) {
+ const cc::SurfaceId& child_id) {
DCHECK(std::find(child_ids_.begin(), child_ids_.end(), child_id) !=
child_ids_.end());
@@ -148,7 +143,7 @@ void SurfacesInstance::DrawAndSwap(const gfx::Size& viewport,
surface_factory_->SubmitCompositorFrame(root_id_, std::move(frame),
cc::SurfaceFactory::DrawCallback());
- output_surface_->SetGLState(gl_state);
+ output_surface_->UpdateStencilTest();
display_->Resize(viewport);
display_->SetExternalClip(clip);
display_->DrawAndSwap();
« no previous file with comments | « android_webview/browser/surfaces_instance.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698