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

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

Issue 890453002: Correctly track texture cleared state when sharing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: c++11 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
« no previous file with comments | « gpu/command_buffer/service/texture_definition.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/texture_definition.cc
diff --git a/gpu/command_buffer/service/texture_definition.cc b/gpu/command_buffer/service/texture_definition.cc
index edd42717d3702ba9b421d5ba87ae79549ca11377..7af662c400c7b29348a117ff1c42621f80a10000 100644
--- a/gpu/command_buffer/service/texture_definition.cc
+++ b/gpu/command_buffer/service/texture_definition.cc
@@ -413,7 +413,8 @@ bool TextureDefinition::Matches(const Texture* texture) const {
if (texture->min_filter_ != min_filter_ ||
texture->mag_filter_ != mag_filter_ ||
texture->wrap_s_ != wrap_s_ ||
- texture->wrap_t_ != wrap_t_) {
+ texture->wrap_t_ != wrap_t_ ||
+ texture->SafeToRenderFrom() != SafeToRenderFrom()) {
return false;
}
@@ -424,5 +425,16 @@ bool TextureDefinition::Matches(const Texture* texture) const {
return true;
}
+bool TextureDefinition::SafeToRenderFrom() const {
+ for (const std::vector<LevelInfo>& face_info : level_infos_) {
+ for (const LevelInfo& level_info : face_info) {
+ if (!level_info.cleared) {
+ return false;
+ }
+ }
+ }
+ return true;
+}
+
} // namespace gles2
} // namespace gpu
« no previous file with comments | « gpu/command_buffer/service/texture_definition.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698