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

Unified Diff: blimp/client/app/compositor/browser_compositor.cc

Issue 2542083004: Make //blimp/client/app a real embedder of //blimp/client/public (Closed)
Patch Set: Fix findbugs issue Created 4 years 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 | « blimp/client/app/blimp_startup.cc ('k') | blimp/client/app/linux/blimp_client_session_linux.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: blimp/client/app/compositor/browser_compositor.cc
diff --git a/blimp/client/app/compositor/browser_compositor.cc b/blimp/client/app/compositor/browser_compositor.cc
index 446715ea279ba771eb96e36e76e16ea3a10c10ed..bb6029c52bbd8786adbb974d55a844bf296fdcc8 100644
--- a/blimp/client/app/compositor/browser_compositor.cc
+++ b/blimp/client/app/compositor/browser_compositor.cc
@@ -20,17 +20,20 @@ BrowserCompositor::BrowserCompositor(
: BlimpEmbedderCompositor(compositor_dependencies) {}
BrowserCompositor::~BrowserCompositor() {
-#if !defined(GPU_SURFACE_HANDLE_IS_ACCELERATED_WINDOW)
- if (surface_handle_ != gpu::kNullSurfaceHandle)
- gpu::GpuSurfaceTracker::Get()->RemoveSurface(surface_handle_);
-#endif
+ SetAcceleratedWidget(gfx::kNullAcceleratedWidget);
}
void BrowserCompositor::SetAcceleratedWidget(gfx::AcceleratedWidget widget) {
scoped_refptr<cc::ContextProvider> provider;
+ if (surface_handle_ != gpu::kNullSurfaceHandle) {
+#if !defined(GPU_SURFACE_HANDLE_IS_ACCELERATED_WINDOW)
+ gpu::GpuSurfaceTracker::Get()->RemoveSurface(surface_handle_);
+#endif
+ surface_handle_ = gpu::kNullSurfaceHandle;
+ }
+
if (widget != gfx::kNullAcceleratedWidget) {
- DCHECK_EQ(gpu::kNullSurfaceHandle, surface_handle_);
#if !defined(GPU_SURFACE_HANDLE_IS_ACCELERATED_WINDOW)
surface_handle_ =
gpu::GpuSurfaceTracker::Get()->AddSurfaceForNativeWidget(widget);
« no previous file with comments | « blimp/client/app/blimp_startup.cc ('k') | blimp/client/app/linux/blimp_client_session_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698