| 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..0319aa3b487600fd1342c2e135dd04e449632bbf 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,
|
| + gfx::NativeWindow root_window) {
|
| + return client ? new CompositorImpl(client, root_window) : NULL;
|
| }
|
|
|
| // static
|
| @@ -129,12 +131,14 @@ jobject CompositorImpl::GetSurface(int surface_id) {
|
| return jsurface;
|
| }
|
|
|
| -CompositorImpl::CompositorImpl(CompositorClient* client)
|
| +CompositorImpl::CompositorImpl(CompositorClient* client,
|
| + gfx::NativeWindow root_window)
|
| : root_layer_(cc::Layer::Create()),
|
| has_transparent_background_(false),
|
| window_(NULL),
|
| surface_id_(0),
|
| - client_(client) {
|
| + client_(client),
|
| + root_window_(root_window) {
|
| DCHECK(client);
|
| ImageTransportFactoryAndroid::AddObserver(this);
|
| }
|
| @@ -481,4 +485,9 @@ blink::WGC3Denum CompositorImpl::GetGLTypeForBitmap(gfx::JavaBitmap& bitmap) {
|
| }
|
| }
|
|
|
| +void CompositorImpl::DidCommit() {
|
| + DCHECK(root_window_);
|
| + root_window_->OnCompositingDidCommit();
|
| +}
|
| +
|
| } // namespace content
|
|
|