| Index: content/browser/renderer_host/compositor_impl_android.cc
|
| diff --git a/content/browser/renderer_host/compositor_impl_android.cc b/content/browser/renderer_host/compositor_impl_android.cc
|
| index 86acf38893b8afe0fd2eaf38a2c51fda43352c4a..e99a2ae5c84f85449f9b908050a9ba081c35d080 100644
|
| --- a/content/browser/renderer_host/compositor_impl_android.cc
|
| +++ b/content/browser/renderer_host/compositor_impl_android.cc
|
| @@ -38,6 +38,7 @@
|
| #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h"
|
| #include "third_party/khronos/GLES2/gl2.h"
|
| #include "third_party/khronos/GLES2/gl2ext.h"
|
| +#include "ui/base/android/window_android.h"
|
| #include "ui/gfx/android/device_display_info.h"
|
| #include "ui/gfx/android/java_bitmap.h"
|
| #include "ui/gfx/frame_time.h"
|
| @@ -103,8 +104,9 @@ static base::LazyInstance<SurfaceMap>
|
| static base::LazyInstance<base::Lock> g_surface_map_lock;
|
|
|
| // static
|
| -Compositor* Compositor::Create(CompositorClient* client) {
|
| - return client ? new CompositorImpl(client) : NULL;
|
| +Compositor* Compositor::Create(CompositorClient* client,
|
| + ui::WindowAndroid* window_android) {
|
| + return client ? new CompositorImpl(client, window_android) : NULL;
|
| }
|
|
|
| // static
|
| @@ -129,12 +131,14 @@ jobject CompositorImpl::GetSurface(int surface_id) {
|
| return jsurface;
|
| }
|
|
|
| -CompositorImpl::CompositorImpl(CompositorClient* client)
|
| +CompositorImpl::CompositorImpl(CompositorClient* client,
|
| + ui::WindowAndroid* window_android)
|
| : root_layer_(cc::Layer::Create()),
|
| has_transparent_background_(false),
|
| window_(NULL),
|
| surface_id_(0),
|
| - client_(client) {
|
| + client_(client),
|
| + window_android_(window_android) {
|
| DCHECK(client);
|
| ImageTransportFactoryAndroid::AddObserver(this);
|
| }
|
| @@ -481,4 +485,9 @@ blink::WGC3Denum CompositorImpl::GetGLTypeForBitmap(gfx::JavaBitmap& bitmap) {
|
| }
|
| }
|
|
|
| +void CompositorImpl::DidCommit() {
|
| + DCHECK(window_android_);
|
| + window_android_->OnCompositingDidCommit(this);
|
| +}
|
| +
|
| } // namespace content
|
|
|