| Index: content/renderer/android/synchronous_compositor_factory.h
|
| diff --git a/content/renderer/android/synchronous_compositor_factory.h b/content/renderer/android/synchronous_compositor_factory.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..c137da0dc2ed617f99c4d67888f3a4cccfe23068
|
| --- /dev/null
|
| +++ b/content/renderer/android/synchronous_compositor_factory.h
|
| @@ -0,0 +1,32 @@
|
| +// Copyright 2013 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 CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_FACTORY_H_
|
| +#define CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_FACTORY_H_
|
| +
|
| +namespace content {
|
| +
|
| +// Decouples creation from usage of the parts needed for the synchonous
|
| +// compositor rendering path. In practice this is only used in single
|
| +// process mode (namely, for Android WebView) hence the implementation of
|
| +// this will be injected from the logical 'browser' side code.
|
| +class SynchronousCompositorFactory {
|
| + public:
|
| + // Must only be called once, e.g. on startup. Ownership of |instance| remains
|
| + // with the caller.
|
| + static void SetInstance(SynchronousCompositorFactory* instance);
|
| + static SynchronousCompositorFactory* GetInstance();
|
| + static bool HasInstance() { return GetInstance() != NULL; }
|
| +
|
| + virtual scoped_ptr<cc::OutputSurface> CreateOutputSurfaceForRenderView(
|
| + int view_id) = 0;
|
| +
|
| + protected:
|
| + SynchronousCompositorFactory() {}
|
| + ~SynchronousCompositorFactory() {}
|
| +};
|
| +
|
| +}
|
| +
|
| +#endif // CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_FACTORY_H_
|
|
|