Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(815)

Unified Diff: content/browser/android/graphics_context.cc

Issue 10828356: Very basic Android browser-side compositing support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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,

Powered by Google App Engine
This is Rietveld 408576698