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

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

Issue 951673002: Revert "Pull chromium at 2c3ffb2355a27c32f45e508ef861416b820c823b" (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 4cdc80df64039e754e6fe5b0a299069ebdcdff97..4f24bd7e0b9bd00d57a7ec653cd04cf26e2eb851 100644
--- a/gpu/command_buffer/service/mailbox_manager_sync.cc
+++ b/gpu/command_buffer/service/mailbox_manager_sync.cc
@@ -22,6 +22,18 @@ namespace gles2 {
namespace {
+bool SkipTextureWorkarounds(const Texture* texture) {
+ // TODO(sievers): crbug.com/352274
+ // Should probably only fail if it already *has* mipmaps, while allowing
+ // incomplete textures here.
+ bool needs_mips =
+ texture->min_filter() != GL_NEAREST && texture->min_filter() != GL_LINEAR;
+ if (texture->target() != GL_TEXTURE_2D || needs_mips || !texture->IsDefined())
+ return true;
+
+ return false;
+}
+
base::LazyInstance<base::Lock> g_lock = LAZY_INSTANCE_INITIALIZER;
typedef std::map<uint32, linked_ptr<gfx::GLFence>> SyncPointToFenceMap;
@@ -184,15 +196,6 @@ MailboxManagerSync::~MailboxManagerSync() {
DCHECK_EQ(0U, texture_to_group_.size());
}
-// static
-bool MailboxManagerSync::SkipTextureWorkarounds(const Texture* texture) {
- // Cannot support mips due to support mismatch between
- // EGL_KHR_gl_texture_2D_image and glEGLImageTargetTexture2DOES for
- // texture levels.
- bool has_mips = texture->NeedsMips() && texture->texture_complete();
- return texture->target() != GL_TEXTURE_2D || has_mips;
-}
-
bool MailboxManagerSync::UsesSync() {
return true;
}
@@ -291,7 +294,6 @@ void MailboxManagerSync::UpdateDefinitionLocked(
if (definition.Matches(texture))
return;
- DCHECK_IMPLIES(gl_image, image_buffer.get());
if (gl_image && !image_buffer->IsClient(gl_image)) {
LOG(ERROR) << "MailboxSync: Incompatible attachment";
return;
« no previous file with comments | « gpu/command_buffer/service/mailbox_manager_sync.h ('k') | gpu/command_buffer/service/mailbox_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698