Index: content/renderer/android/synchronous_compositor_impl.h |
diff --git a/content/renderer/android/synchronous_compositor_impl.h b/content/renderer/android/synchronous_compositor_impl.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..79d552422cdf388b1b3e1cf920d61c5e6c7f2bfb |
--- /dev/null |
+++ b/content/renderer/android/synchronous_compositor_impl.h |
@@ -0,0 +1,68 @@ |
+// 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_IMPL_H_ |
+#define CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_IMPL_H_ |
+ |
+#include "base/basictypes.h" |
+#include "base/compiler_specific.h" |
+#include "base/memory/scoped_ptr.h" |
+#include "base/memory/weak_ptr.h" |
+#include "cc/input/layer_scroll_offset_delegate.h" |
+#include "content/public/renderer/android/synchronous_compositor.h" |
+#include "content/renderer/android/synchronous_compositor_output_surface.h" |
+ |
+namespace cc { |
+class InputHandler; |
+class OutputSurface; |
+} |
+ |
+namespace content { |
+ |
+// TODO(mkosiba): Add a comment! |
+class SynchronousCompositorImpl |
+ : public SynchronousCompositor, |
+ public SynchronousCompositorOutputSurface::Delegate, |
+ public cc::LayerScrollOffsetDelegate { |
+ public: |
+ explicit SynchronousCompositorImpl(int32 routing_id); |
+ virtual ~SynchronousCompositorImpl(); |
+ |
+ scoped_ptr<cc::OutputSurface> CreateOutputSurface(); |
+ void didCreateInputHandler(base::WeakPtr<cc::InputHandler> input_handler); |
jamesr
2013/05/22 01:28:13
why is this function named in WebKit style?
mkosiba (inactive)
2013/05/22 17:26:17
no idea. probably because most of the didDoSomethi
|
+ |
+ // SynchronousCompositor |
+ virtual bool IsHwReady() OVERRIDE; |
+ virtual void SetClient(SynchronousCompositorClient* compositor_client) |
+ OVERRIDE; |
+ virtual bool DemandDrawSw(SkCanvas* canvas) OVERRIDE; |
+ virtual bool DemandDrawHw( |
+ gfx::Size view_size, |
+ const gfx::Transform& transform, |
+ gfx::Rect clip) OVERRIDE; |
+ |
+ // SynchronousCompositorOutputSurface::Delegate |
+ virtual void SetContinuousInvalidate(bool enable) OVERRIDE; |
+ virtual void DidCreateSynchronousCompositor() OVERRIDE; |
+ virtual void DidDestroyCompositor() OVERRIDE; |
+ |
+ // LayerScrollOffsetDelegate |
+ virtual void SetTotalScrollOffset(gfx::Vector2dF new_value) OVERRIDE; |
+ virtual gfx::Vector2dF GetTotalScrollOffset() OVERRIDE; |
+ |
+ private: |
+ bool CalledOnValidThread() const; |
+ void didCreateInputHandlerOnImplThread( |
+ base::WeakPtr<cc::InputHandler> input_handler); |
+ |
+ int routing_id_; |
+ SynchronousCompositorClient* compositor_client_; |
+ SynchronousCompositorOutputSurface* output_surface_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorImpl); |
+}; |
+ |
+} // namespace content |
+ |
+#endif // CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_IMPL_H_ |