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

Unified Diff: ui/gl/gl_image_memory.cc

Issue 977853002: Reland of Revert of gpu: introduce glCopySubTextureCHROMIUM (patchset #1 id:1 of https://codereview… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Apply image optimization to CopySubTexture. move glValidateProgram 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: ui/gl/gl_image_memory.cc
diff --git a/ui/gl/gl_image_memory.cc b/ui/gl/gl_image_memory.cc
index 6b9a51967a0f2e42d41dc192585a4160236ef923..7efc37654f02a0db1edee86ebae454002f544591 100644
--- a/ui/gl/gl_image_memory.cc
+++ b/ui/gl/gl_image_memory.cc
@@ -264,7 +264,7 @@ bool GLImageMemory::BindTexImage(unsigned target) {
return true;
}
-bool GLImageMemory::CopyTexImage(unsigned target) {
+bool GLImageMemory::CopyTexSubImage(unsigned target, int xoffset, int yoffset) {
TRACE_EVENT0("gpu", "GLImageMemory::CopyTexImage");
// GL_TEXTURE_EXTERNAL_OES is not a supported CopyTexImage target.
@@ -275,17 +275,13 @@ bool GLImageMemory::CopyTexImage(unsigned target) {
if (IsCompressedFormat(format_)) {
glCompressedTexSubImage2D(target,
0, // level
- 0, // x-offset
- 0, // y-offset
- size_.width(), size_.height(),
+ xoffset, yoffset, size_.width(), size_.height(),
DataFormat(format_), SizeInBytes(size_, format_),
memory_);
} else {
glTexSubImage2D(target, 0, // level
- 0, // x
- 0, // y
- size_.width(), size_.height(), DataFormat(format_),
- DataType(format_), memory_);
+ xoffset, yoffset, size_.width(), size_.height(),
+ DataFormat(format_), DataType(format_), memory_);
}
return true;
« ui/gl/gl_image.h ('K') | « ui/gl/gl_image_memory.h ('k') | ui/gl/gl_image_stub.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698