summaryrefslogtreecommitdiffstats
path: root/mandoline
diff options
context:
space:
mode:
authorjam <jam@chromium.org>2015-06-16 07:55:19 -0700
committerCommit bot <commit-bot@chromium.org>2015-06-16 14:55:58 +0000
commitb14138431960bb3542e7b1b7447363ef13528e0d (patch)
tree5fa9bb213e3b6d66e4658af402a869bcb6245bbb /mandoline
parente71496a4aa510d6522ffef12ac4c97b417ad86df (diff)
downloadchromium_src-b14138431960bb3542e7b1b7447363ef13528e0d.zip
chromium_src-b14138431960bb3542e7b1b7447363ef13528e0d.tar.gz
chromium_src-b14138431960bb3542e7b1b7447363ef13528e0d.tar.bz2
Support impl-side painting in Mandoline.
This is now the default in cc and the old code paths are being removed, so we need to use impl-side painting. The changes are: -add necessary thunks for the gl methods -expose gpu::GpuMemoryBufferManager and cc::TaskGraphRunner in ui and html_viewer -IPC to view_manager and call the GPU code (modelled on content) BUG=499030 NOPRESUBMIT=true Review URL: https://codereview.chromium.org/1181013010 Cr-Commit-Position: refs/heads/master@{#334602}
Diffstat (limited to 'mandoline')
-rw-r--r--mandoline/ui/aura/BUILD.gn3
-rw-r--r--mandoline/ui/aura/surface_context_factory.cc7
-rw-r--r--mandoline/ui/aura/surface_context_factory.h4
3 files changed, 8 insertions, 6 deletions
diff --git a/mandoline/ui/aura/BUILD.gn b/mandoline/ui/aura/BUILD.gn
index a25c02b..275fce86 100644
--- a/mandoline/ui/aura/BUILD.gn
+++ b/mandoline/ui/aura/BUILD.gn
@@ -30,8 +30,9 @@ source_set("aura") {
"//base/third_party/dynamic_annotations",
"//cc",
"//cc/surfaces",
- "//components/view_manager/public/interfaces",
+ "//components/view_manager/gles2:lib",
"//components/view_manager/public/cpp",
+ "//components/view_manager/public/interfaces",
"//skia",
"//mojo/application/public/cpp",
"//mojo/application/public/interfaces",
diff --git a/mandoline/ui/aura/surface_context_factory.cc b/mandoline/ui/aura/surface_context_factory.cc
index e5fcbb54..ebf9807 100644
--- a/mandoline/ui/aura/surface_context_factory.cc
+++ b/mandoline/ui/aura/surface_context_factory.cc
@@ -63,7 +63,6 @@ void SurfaceContextFactory::RemoveCompositor(ui::Compositor* compositor) {
}
bool SurfaceContextFactory::DoesCreateTestContexts() {
- NOTIMPLEMENTED();
return false;
}
@@ -81,13 +80,11 @@ cc::SharedBitmapManager* SurfaceContextFactory::GetSharedBitmapManager() {
gpu::GpuMemoryBufferManager*
SurfaceContextFactory::GetGpuMemoryBufferManager() {
- NOTIMPLEMENTED();
- return nullptr;
+ return &gpu_memory_buffer_manager_;
}
cc::TaskGraphRunner* SurfaceContextFactory::GetTaskGraphRunner() {
- NOTIMPLEMENTED();
- return nullptr;
+ return raster_thread_helper_.task_graph_runner();
}
scoped_ptr<cc::SurfaceIdAllocator>
diff --git a/mandoline/ui/aura/surface_context_factory.h b/mandoline/ui/aura/surface_context_factory.h
index abf8d9b..90b9934 100644
--- a/mandoline/ui/aura/surface_context_factory.h
+++ b/mandoline/ui/aura/surface_context_factory.h
@@ -5,6 +5,8 @@
#ifndef MANDOLINE_UI_AURA_SURFACE_CONTEXT_FACTORY_H_
#define MANDOLINE_UI_AURA_SURFACE_CONTEXT_FACTORY_H_
+#include "components/view_manager/gles2/mojo_gpu_memory_buffer_manager.h"
+#include "components/view_manager/gles2/raster_thread_helper.h"
#include "mandoline/ui/aura/surface_binding.h"
#include "ui/compositor/compositor.h"
@@ -41,6 +43,8 @@ class SurfaceContextFactory : public ui::ContextFactory {
SurfaceBinding surface_binding_;
uint32_t next_surface_id_namespace_;
+ gles2::RasterThreadHelper raster_thread_helper_;
+ gles2::MojoGpuMemoryBufferManager gpu_memory_buffer_manager_;
DISALLOW_COPY_AND_ASSIGN(SurfaceContextFactory);
};