Commit e7002da7 authored by jbauman's avatar jbauman Committed by Commit bot

Add TextureMailboxDeleter to cc::Display.

BUG=

Review URL: https://codereview.chromium.org/580593002

Cr-Commit-Position: refs/heads/master@{#297289}
parent 55fab14d
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include "cc/output/direct_renderer.h" #include "cc/output/direct_renderer.h"
#include "cc/output/gl_renderer.h" #include "cc/output/gl_renderer.h"
#include "cc/output/software_renderer.h" #include "cc/output/software_renderer.h"
#include "cc/resources/texture_mailbox_deleter.h"
#include "cc/surfaces/display_client.h" #include "cc/surfaces/display_client.h"
#include "cc/surfaces/surface.h" #include "cc/surfaces/surface.h"
#include "cc/surfaces/surface_aggregator.h" #include "cc/surfaces/surface_aggregator.h"
...@@ -26,7 +27,9 @@ Display::Display(DisplayClient* client, ...@@ -26,7 +27,9 @@ Display::Display(DisplayClient* client,
manager_(manager), manager_(manager),
bitmap_manager_(bitmap_manager), bitmap_manager_(bitmap_manager),
blocking_main_thread_task_runner_( blocking_main_thread_task_runner_(
BlockingTaskRunner::Create(base::MessageLoopProxy::current())) { BlockingTaskRunner::Create(base::MessageLoopProxy::current())),
texture_mailbox_deleter_(
new TextureMailboxDeleter(base::MessageLoopProxy::current())) {
manager_->AddObserver(this); manager_->AddObserver(this);
} }
...@@ -63,13 +66,12 @@ void Display::InitializeOutputSurface() { ...@@ -63,13 +66,12 @@ void Display::InitializeOutputSurface() {
return; return;
if (output_surface->context_provider()) { if (output_surface->context_provider()) {
TextureMailboxDeleter* texture_mailbox_deleter = NULL;
scoped_ptr<GLRenderer> renderer = scoped_ptr<GLRenderer> renderer =
GLRenderer::Create(this, GLRenderer::Create(this,
&settings_, &settings_,
output_surface.get(), output_surface.get(),
resource_provider.get(), resource_provider.get(),
texture_mailbox_deleter, texture_mailbox_deleter_.get(),
highp_threshold_min); highp_threshold_min);
if (!renderer) if (!renderer)
return; return;
......
...@@ -30,6 +30,7 @@ class Surface; ...@@ -30,6 +30,7 @@ class Surface;
class SurfaceAggregator; class SurfaceAggregator;
class SurfaceIdAllocator; class SurfaceIdAllocator;
class SurfaceFactory; class SurfaceFactory;
class TextureMailboxDeleter;
// A Display produces a surface that can be used to draw to a physical display // A Display produces a surface that can be used to draw to a physical display
// (OutputSurface). The client is responsible for creating and sizing the // (OutputSurface). The client is responsible for creating and sizing the
...@@ -91,6 +92,7 @@ class CC_SURFACES_EXPORT Display : public OutputSurfaceClient, ...@@ -91,6 +92,7 @@ class CC_SURFACES_EXPORT Display : public OutputSurfaceClient,
scoped_ptr<SurfaceAggregator> aggregator_; scoped_ptr<SurfaceAggregator> aggregator_;
scoped_ptr<DirectRenderer> renderer_; scoped_ptr<DirectRenderer> renderer_;
scoped_ptr<BlockingTaskRunner> blocking_main_thread_task_runner_; scoped_ptr<BlockingTaskRunner> blocking_main_thread_task_runner_;
scoped_ptr<TextureMailboxDeleter> texture_mailbox_deleter_;
DISALLOW_COPY_AND_ASSIGN(Display); DISALLOW_COPY_AND_ASSIGN(Display);
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment