OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef ANDROID_WEBVIEW_BROWSER_SHARED_RENDERER_STATE_CLIENT_H_ |
| 6 #define ANDROID_WEBVIEW_BROWSER_SHARED_RENDERER_STATE_CLIENT_H_ |
| 7 |
| 8 #include "base/android/scoped_java_ref.h" |
| 9 #include "ui/gfx/geometry/point.h" |
| 10 #include "ui/gfx/geometry/size_f.h" |
| 11 #include "ui/gfx/geometry/vector2d_f.h" |
| 12 |
| 13 namespace android_webview { |
| 14 |
| 15 class SharedRendererStateClient { |
| 16 public: |
| 17 virtual void DrawConstraintsUpdated( |
| 18 const ParentCompositorDrawConstraints& draw_constraints) = 0; |
| 19 |
| 20 // Request DrawGL to be in called AwDrawGLInfo::kModeProcess type. |
| 21 // |wait_for_completion| will cause the call to block until DrawGL has |
| 22 // happened. The callback may never be made, and the mode may be promoted to |
| 23 // kModeDraw. |
| 24 virtual bool RequestDrawGL(bool wait_for_completion) = 0; |
| 25 |
| 26 // Call postInvalidateOnAnimation for invalidations. This is only used to |
| 27 // synchronize draw functor destruction. |
| 28 virtual void DetachFunctorFromView() = 0; |
| 29 |
| 30 virtual bool IsHardwareEnabled() = 0; |
| 31 |
| 32 protected: |
| 33 virtual ~SharedRendererStateClient() {} |
| 34 }; |
| 35 |
| 36 } // namespace android_webview |
| 37 |
| 38 #endif // ANDROID_WEBVIEW_BROWSER_SHARED_RENDERER_STATE_CLIENT_H_ |
OLD | NEW |