| Index: gpu/ipc/service/stream_texture_android.cc
|
| diff --git a/content/common/gpu/stream_texture_android.cc b/gpu/ipc/service/stream_texture_android.cc
|
| similarity index 93%
|
| rename from content/common/gpu/stream_texture_android.cc
|
| rename to gpu/ipc/service/stream_texture_android.cc
|
| index 15ebb532d492d4c60c9b6783aec71121d8cdacd1..fd4be1713707771537cb3902a19f92956f577353 100644
|
| --- a/content/common/gpu/stream_texture_android.cc
|
| +++ b/gpu/ipc/service/stream_texture_android.cc
|
| @@ -2,31 +2,31 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "content/common/gpu/stream_texture_android.h"
|
| +#include "gpu/ipc/service/stream_texture_android.h"
|
|
|
| #include <string.h>
|
|
|
| #include "base/bind.h"
|
| #include "base/strings/stringize_macros.h"
|
| -#include "content/common/gpu/gpu_channel.h"
|
| #include "gpu/command_buffer/service/context_group.h"
|
| #include "gpu/command_buffer/service/context_state.h"
|
| #include "gpu/command_buffer/service/gles2_cmd_decoder.h"
|
| #include "gpu/command_buffer/service/texture_manager.h"
|
| #include "gpu/ipc/common/android/surface_texture_peer.h"
|
| #include "gpu/ipc/common/gpu_messages.h"
|
| +#include "gpu/ipc/service/gpu_channel.h"
|
| #include "ui/gfx/geometry/size.h"
|
| #include "ui/gl/gl_context.h"
|
| #include "ui/gl/gl_helper.h"
|
| #include "ui/gl/scoped_binders.h"
|
| #include "ui/gl/scoped_make_current.h"
|
|
|
| -namespace content {
|
| +namespace gpu {
|
|
|
| -using gpu::gles2::ContextGroup;
|
| -using gpu::gles2::GLES2Decoder;
|
| -using gpu::gles2::TextureManager;
|
| -using gpu::gles2::TextureRef;
|
| +using gles2::ContextGroup;
|
| +using gles2::GLES2Decoder;
|
| +using gles2::TextureManager;
|
| +using gles2::TextureRef;
|
|
|
| // static
|
| bool StreamTexture::Create(GpuCommandBufferStub* owner_stub,
|
| @@ -51,7 +51,7 @@ bool StreamTexture::Create(GpuCommandBufferStub* owner_stub,
|
| GL_UNSIGNED_BYTE, gfx::Rect(size));
|
| texture_manager->SetLevelStreamTextureImage(
|
| texture, GL_TEXTURE_EXTERNAL_OES, 0, gl_image.get(),
|
| - gpu::gles2::Texture::UNBOUND);
|
| + gles2::Texture::UNBOUND);
|
| return true;
|
| }
|
|
|
| @@ -154,9 +154,9 @@ void StreamTexture::UpdateTexImage() {
|
| // The cmd decoder takes care of restoring the binding for this GLImage as
|
| // far as the current context is concerned, but if we temporarily change
|
| // it, we have to keep the state intact in *that* context also.
|
| - const gpu::gles2::ContextState* state =
|
| + const gles2::ContextState* state =
|
| owner_stub_->decoder()->GetContextState();
|
| - const gpu::gles2::TextureUnit& active_unit =
|
| + const gles2::TextureUnit& active_unit =
|
| state->texture_units[state->active_texture_unit];
|
| glBindTexture(GL_TEXTURE_EXTERNAL_OES,
|
| active_unit.bound_texture_external_oes.get()
|
| @@ -187,14 +187,14 @@ bool StreamTexture::CopyTexImage(unsigned target) {
|
|
|
| TextureManager* texture_manager =
|
| owner_stub_->decoder()->GetContextGroup()->texture_manager();
|
| - gpu::gles2::Texture* texture =
|
| + gles2::Texture* texture =
|
| texture_manager->GetTextureForServiceId(texture_id_);
|
| if (texture) {
|
| // By setting image state to UNBOUND instead of COPIED we ensure that
|
| // CopyTexImage() is called each time the surface texture is used for
|
| // drawing.
|
| texture->SetLevelStreamTextureImage(GL_TEXTURE_EXTERNAL_OES, 0, this,
|
| - gpu::gles2::Texture::UNBOUND);
|
| + gles2::Texture::UNBOUND);
|
| }
|
|
|
| return true;
|
| @@ -240,7 +240,7 @@ void StreamTexture::OnEstablishPeer(int32_t primary_id, int32_t secondary_id) {
|
|
|
| base::ProcessHandle process = owner_stub_->channel()->GetClientPID();
|
|
|
| - gpu::SurfaceTexturePeer::GetInstance()->EstablishSurfaceTexturePeer(
|
| + SurfaceTexturePeer::GetInstance()->EstablishSurfaceTexturePeer(
|
| process, surface_texture_, primary_id, secondary_id);
|
| }
|
|
|
| @@ -274,4 +274,4 @@ void StreamTexture::OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd,
|
| // TODO(ericrk): Add OnMemoryDump for GLImages. crbug.com/514914
|
| }
|
|
|
| -} // namespace content
|
| +} // namespace gpu
|
|
|