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

Unified Diff: gpu/command_buffer/service/mailbox_manager_sync.cc

Issue 769703005: Move AW renderer compositor context to gpu thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ready Created 5 years, 11 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: gpu/command_buffer/service/mailbox_manager_sync.cc
diff --git a/gpu/command_buffer/service/mailbox_manager_sync.cc b/gpu/command_buffer/service/mailbox_manager_sync.cc
index 65376afdf87e9843485787e21fdd16acbc970b67..5a8e0d9f1a119c9178456b9f2d5bfee83ac28676 100644
--- a/gpu/command_buffer/service/mailbox_manager_sync.cc
+++ b/gpu/command_buffer/service/mailbox_manager_sync.cc
@@ -7,8 +7,11 @@
#include <algorithm>
#include <queue>
+#include "base/command_line.h"
+#include "base/lazy_instance.h"
#include "base/memory/linked_ptr.h"
#include "base/synchronization/lock.h"
+#include "gpu/command_buffer/service/gpu_switches.h"
#include "gpu/command_buffer/service/texture_manager.h"
#include "ui/gl/gl_fence.h"
#include "ui/gl/gl_implementation.h"
@@ -22,6 +25,18 @@ namespace gles2 {
namespace {
+struct SkipManagedPool {
+ SkipManagedPool() {
+ skip = !base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableAsyncPixelWithThreadedTextureMailboxes);
+ }
+
+ bool skip;
+};
+
+base::LazyInstance<SkipManagedPool> g_skip_managed_pool =
+ LAZY_INSTANCE_INITIALIZER;
+
bool SkipTextureWorkarounds(const Texture* texture) {
// TODO(sievers): crbug.com/352274
// Should probably only fail if it already *has* mipmaps, while allowing
@@ -33,8 +48,10 @@ bool SkipTextureWorkarounds(const Texture* texture) {
// Skip compositor resources/tile textures.
// TODO: Remove this, see crbug.com/399226.
- if (texture->pool() == GL_TEXTURE_POOL_MANAGED_CHROMIUM)
+ if (g_skip_managed_pool.Get().skip &&
+ texture->pool() == GL_TEXTURE_POOL_MANAGED_CHROMIUM) {
no sievers 2015/01/15 20:26:05 Can we just remove the workaround entirely? We sho
return true;
+ }
return false;
}

Powered by Google App Engine
This is Rietveld 408576698