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

Unified Diff: content/common/gpu/stream_texture_android.h

Issue 1536713002: Apply the Surface Texture transformation matrix during texture copy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Apply stream texture transformation matrix by implemementing CopyTex(Sub)Image Created 5 years 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: content/common/gpu/stream_texture_android.h
diff --git a/content/common/gpu/stream_texture_android.h b/content/common/gpu/stream_texture_android.h
index a761206b2ac297fd24b43d1a70822422b8c3148a..a885818585d506633bbe9437ca7f84d34f98360c 100644
--- a/content/common/gpu/stream_texture_android.h
+++ b/content/common/gpu/stream_texture_android.h
@@ -12,6 +12,10 @@
#include "ui/gl/android/surface_texture.h"
#include "ui/gl/gl_image.h"
+namespace ui {
+class ScopedMakeCurrent;
+}
+
namespace gfx {
class Size;
}
@@ -54,6 +58,11 @@ class StreamTexture : public gl::GLImage,
// GpuCommandBufferStub::DestructionObserver implementation.
void OnWillDestroyStub() override;
+ scoped_ptr<ui::ScopedMakeCurrent> MakeStubCurrent();
+ void DoUpdateTexImage();
+ bool DoCopyTexture(const gfx::Point& offset, const gfx::Rect& rect);
+
+ void UpdateTransformMatrix();
// Called when a new frame is available for the SurfaceTexture.
void OnFrameAvailable();
@@ -82,8 +91,16 @@ class StreamTexture : public gl::GLImage,
GpuCommandBufferStub* owner_stub_;
int32 route_id_;
bool has_listener_;
+ bool matrix_modified_;
uint32 texture_id_;
+ unsigned framebuffer_;
+ unsigned vertex_shader_;
+ unsigned fragment_shader_;
+ unsigned program_;
+ unsigned vertex_buffer_;
+ int u_xform_loc_;
+
base::WeakPtrFactory<StreamTexture> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(StreamTexture);
};
« no previous file with comments | « no previous file | content/common/gpu/stream_texture_android.cc » ('j') | content/common/gpu/stream_texture_android.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698