summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjbauman <jbauman@chromium.org>2014-09-29 15:39:12 -0700
committerCommit bot <commit-bot@chromium.org>2014-09-29 22:39:59 +0000
commite7002da73ea0a881bea02bab6781672ca3eeb7b4 (patch)
treefa6f796bfcf2237dcfd5ef3b712dd49937e02f09
parent55fab14d5efed15eec5d91b536a80607f58800d6 (diff)
downloadchromium_src-e7002da73ea0a881bea02bab6781672ca3eeb7b4.zip
chromium_src-e7002da73ea0a881bea02bab6781672ca3eeb7b4.tar.gz
chromium_src-e7002da73ea0a881bea02bab6781672ca3eeb7b4.tar.bz2
Add TextureMailboxDeleter to cc::Display.
BUG= Review URL: https://codereview.chromium.org/580593002 Cr-Commit-Position: refs/heads/master@{#297289}
-rw-r--r--cc/surfaces/display.cc8
-rw-r--r--cc/surfaces/display.h2
2 files changed, 7 insertions, 3 deletions
diff --git a/cc/surfaces/display.cc b/cc/surfaces/display.cc
index 62c9de4..fd7d4b6 100644
--- a/cc/surfaces/display.cc
+++ b/cc/surfaces/display.cc
@@ -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;
diff --git a/cc/surfaces/display.h b/cc/surfaces/display.h
index 76c14c5..af972cb 100644
--- a/cc/surfaces/display.h
+++ b/cc/surfaces/display.h
@@ -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);
};