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

Unified Diff: blimp/client/feature/compositor/blimp_context_provider.h

Issue 2241623002: blimp: Move compositing, input and render widget feature to client/core. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed comments from #7 Created 4 years, 4 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
Index: blimp/client/feature/compositor/blimp_context_provider.h
diff --git a/blimp/client/feature/compositor/blimp_context_provider.h b/blimp/client/feature/compositor/blimp_context_provider.h
deleted file mode 100644
index 8424fc75446a5c138e056fce270e344171565d15..0000000000000000000000000000000000000000
--- a/blimp/client/feature/compositor/blimp_context_provider.h
+++ /dev/null
@@ -1,73 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef BLIMP_CLIENT_FEATURE_COMPOSITOR_BLIMP_CONTEXT_PROVIDER_H_
-#define BLIMP_CLIENT_FEATURE_COMPOSITOR_BLIMP_CONTEXT_PROVIDER_H_
-
-#include <stdint.h>
-
-#include <memory>
-
-#include "base/macros.h"
-#include "base/synchronization/lock.h"
-#include "base/threading/thread_checker.h"
-#include "cc/output/context_provider.h"
-#include "gpu/command_buffer/client/gl_in_process_context.h"
-#include "ui/gl/gl_surface.h"
-
-namespace skia_bindings {
-class GrContextForGLES2Interface;
-} // namespace skia_bindings
-
-namespace blimp {
-namespace client {
-
-// Helper class to provide a graphics context for the compositor.
-class BlimpContextProvider : public cc::ContextProvider {
- public:
- static scoped_refptr<BlimpContextProvider> Create(
- gfx::AcceleratedWidget widget,
- gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager);
-
- // cc::ContextProvider implementation.
- bool BindToCurrentThread() override;
- void DetachFromThread() override;
- gpu::Capabilities ContextCapabilities() override;
- gpu::gles2::GLES2Interface* ContextGL() override;
- gpu::ContextSupport* ContextSupport() override;
- class GrContext* GrContext() override;
- void InvalidateGrContext(uint32_t state) override;
- base::Lock* GetLock() override;
- void DeleteCachedResources() override;
- void SetLostContextCallback(
- const LostContextCallback& lost_context_callback) override;
-
- // Gives the GL internal format that should be used for calling CopyTexImage2D
- // on the default framebuffer.
- uint32_t GetCopyTextureInternalFormat();
-
- protected:
- BlimpContextProvider(
- gfx::AcceleratedWidget widget,
- gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager);
- ~BlimpContextProvider() override;
-
- private:
- void OnLostContext();
-
- base::ThreadChecker main_thread_checker_;
- base::ThreadChecker context_thread_checker_;
-
- std::unique_ptr<gpu::GLInProcessContext> context_;
- std::unique_ptr<skia_bindings::GrContextForGLES2Interface> gr_context_;
-
- LostContextCallback lost_context_callback_;
-
- DISALLOW_COPY_AND_ASSIGN(BlimpContextProvider);
-};
-
-} // namespace client
-} // namespace blimp
-
-#endif // BLIMP_CLIENT_FEATURE_COMPOSITOR_BLIMP_CONTEXT_PROVIDER_H_

Powered by Google App Engine
This is Rietveld 408576698