using gpu::gles2::TextureRef;
// static
-int32 StreamTexture::Create(
+bool StreamTexture::Create(
GpuCommandBufferStub* owner_stub,
- uint32 client_texture_id) {
- GpuChannel* channel = owner_stub->channel();
- int32 route_id = channel->GenerateRouteID();
-
+ uint32 client_texture_id,
+ int stream_id) {
GLES2Decoder* decoder = owner_stub->decoder();
TextureManager* texture_manager =
decoder->GetContextGroup()->texture_manager();
// TODO: Ideally a valid image id was returned to the client so that
// it could then call glBindTexImage2D() for doing the following.
scoped_refptr<gfx::GLImage> gl_image(
- new StreamTexture(owner_stub, route_id, texture->service_id()));
+ new StreamTexture(owner_stub, stream_id, texture->service_id()));
gfx::Size size = gl_image->GetSize();
texture_manager->SetTarget(texture, GL_TEXTURE_EXTERNAL_OES);
texture_manager->SetLevelInfo(texture,
true);
texture_manager->SetLevelImage(
texture, GL_TEXTURE_EXTERNAL_OES, 0, gl_image);
- return route_id;
+ return true;
}
- return 0;
+ return false;
}
StreamTexture::StreamTexture(GpuCommandBufferStub* owner_stub,
surface_texture_ = NULL;
}
-void StreamTexture::Destroy() {
+void StreamTexture::Destroy(bool have_context) {
NOTREACHED();
}
NOTREACHED();
}
+bool StreamTexture::ScheduleOverlayPlane(gfx::AcceleratedWidget widget,
+ int z_order,
+ gfx::OverlayTransform transform,
+ const gfx::Rect& bounds_rect,
+ const gfx::RectF& crop_rect) {
+ NOTREACHED();
+ return false;
+}
+
} // namespace content