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

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

Issue 952893003: Update from https://crrev.com/317530 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Fix gn for nacl 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 4f24bd7e0b9bd00d57a7ec653cd04cf26e2eb851..4cdc80df64039e754e6fe5b0a299069ebdcdff97 100644
--- a/gpu/command_buffer/service/mailbox_manager_sync.cc
+++ b/gpu/command_buffer/service/mailbox_manager_sync.cc
@@ -22,18 +22,6 @@ 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;
@@ -196,6 +184,15 @@ 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;
}
@@ -294,6 +291,7 @@ 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