Chromium Code Reviews| Index: content/browser/android/graphics_context.cc |
| diff --git a/content/browser/android/graphics_context.cc b/content/browser/android/graphics_context.cc |
| index 29b7ad6f16933ab171b5c6aae918dc12971e3760..f5922d1664b475ac15ee315c07a3ac591fddd183 100644 |
| --- a/content/browser/android/graphics_context.cc |
| +++ b/content/browser/android/graphics_context.cc |
| @@ -2,12 +2,12 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| -#include "content/public/browser/android/graphics_context.h" |
| +#include "content/browser/android/graphics_context.h" |
| #include "base/memory/scoped_ptr.h" |
| -#include "content/browser/android/draw_delegate_impl.h" |
| #include "content/browser/gpu/browser_gpu_channel_host_factory.h" |
| #include "content/browser/gpu/gpu_surface_tracker.h" |
| +#include "content/browser/renderer_host/compositor_impl_android.h" |
| #include "content/common/gpu/client/gpu_channel_host.h" |
| #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" |
| #include "content/common/gpu/gpu_process_launch_causes.h" |
| @@ -45,13 +45,17 @@ class CmdBufferGraphicsContext : public content::GraphicsContext { |
| ANativeWindow_release(window_); |
| } |
| - virtual WebKit::WebGraphicsContext3D* GetContext3D() { |
| + virtual WebKit::WebGraphicsContext3D* GetContext3D() OVERRIDE { |
| return context_.get(); |
| } |
| - virtual uint32 InsertSyncPoint() { |
| + virtual uint32 InsertSyncPoint() OVERRIDE { |
| return context_->insertSyncPoint(); |
|
klobag.chromium
2012/08/22 07:01:18
Is the only reason to have this context_ is to mak
no sievers
2012/08/22 21:17:40
It also takes care of referencing the ANativeWindo
|
| } |
| + virtual int GetSurfaceID() OVERRIDE { |
| + return surface_id_; |
| + } |
| + |
| private: |
| scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context_; |
| int surface_id_; |
| @@ -83,7 +87,7 @@ GraphicsContext* GraphicsContext::CreateForUI( |
| base::WeakPtr<WebGraphicsContext3DSwapBuffersClient> swap_client; |
| scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context( |
| new WebGraphicsContext3DCommandBufferImpl( |
| - surface_id, |
| + 0, |
| url, |
| factory, |
| swap_client)); |
| @@ -105,7 +109,7 @@ GraphicsContext* GraphicsContext::CreateForUI( |
| handle.parent_texture_id[1] = context->createTexture(); |
| handle.sync_point = context->insertSyncPoint(); |
| - DrawDelegateImpl::GetInstance()->SetDrawSurface(handle); |
| + CompositorImpl::GetInstance()->SetCompositorSurface(handle); |
| return new CmdBufferGraphicsContext( |
| context.release(), surface_id, window, |