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

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

Issue 1883273004: Emulate TEXTURE_IMMUTABLE_LEVELS on GL lower than 4.2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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_manager.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_manager.cc
diff --git a/gpu/command_buffer/service/texture_manager.cc b/gpu/command_buffer/service/texture_manager.cc
index 8297c6d04556fbdee6806487b6a81552810637e3..83b427b7e68d96de95cfa2f71c400ca347719f88 100644
--- a/gpu/command_buffer/service/texture_manager.cc
+++ b/gpu/command_buffer/service/texture_manager.cc
@@ -1319,6 +1319,21 @@ bool Texture::ClearRenderableLevels(GLES2Decoder* decoder) {
return true;
}
+GLint Texture::GetImmutableLevels() const {
+ if (!immutable_)
+ return 0;
+ GLint levels = 0;
+ if (immutable_) {
+ DCHECK(face_infos_.size() > 0);
+ for (size_t ii = 0; ii < face_infos_[0].level_infos.size(); ++ii) {
+ const Texture::LevelInfo& info = face_infos_[0].level_infos[ii];
+ if (info.target != 0)
+ levels++;
+ }
+ }
+ return levels;
+}
+
gfx::Rect Texture::GetLevelClearedRect(GLenum target, GLint level) const {
size_t face_index = GLES2Util::GLTargetToFaceIndex(target);
if (face_index >= face_infos_.size() ||
« no previous file with comments | « gpu/command_buffer/service/texture_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698