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 @@
#include "cc/output/direct_renderer.h"
#include "cc/output/gl_renderer.h"
#include "cc/output/software_renderer.h"
#include "cc/resources/texture_mailbox_deleter.h"
#include "cc/surfaces/display_client.h"
#include "cc/surfaces/surface.h"
#include "cc/surfaces/surface_aggregator.h"
......@@ -26,7 +27,9 @@ Display::Display(DisplayClient* client,
manager_(manager),
bitmap_manager_(bitmap_manager),
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);
}
......@@ -63,13 +66,12 @@ void Display::InitializeOutputSurface() {
return;
if (output_surface->context_provider()) {
TextureMailboxDeleter* texture_mailbox_deleter = NULL;
scoped_ptr<GLRenderer> renderer =
GLRenderer::Create(this,
&settings_,
output_surface.get(),
resource_provider.get(),
texture_mailbox_deleter,
texture_mailbox_deleter_.get(),
highp_threshold_min);
if (!renderer)
return;
......
......@@ -30,6 +30,7 @@ class Surface;
class SurfaceAggregator;
class SurfaceIdAllocator;
class SurfaceFactory;
class TextureMailboxDeleter;
// 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
......@@ -91,6 +92,7 @@ class CC_SURFACES_EXPORT Display : public OutputSurfaceClient,
scoped_ptr<SurfaceAggregator> aggregator_;
scoped_ptr<DirectRenderer> renderer_;
scoped_ptr<BlockingTaskRunner> blocking_main_thread_task_runner_;
scoped_ptr<TextureMailboxDeleter> texture_mailbox_deleter_;
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