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

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

Issue 22824009: Remove StreamTextureManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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: 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 486bdacad32f013153380a74dc3ad9d343a2e681..e8276fb84887333128433510f47eff028b635690 100644
--- a/gpu/command_buffer/service/texture_manager.cc
+++ b/gpu/command_buffer/service/texture_manager.cc
@@ -12,7 +12,6 @@
#include "gpu/command_buffer/service/gles2_cmd_decoder.h"
#include "gpu/command_buffer/service/mailbox_manager.h"
#include "gpu/command_buffer/service/memory_tracking.h"
-#include "gpu/command_buffer/service/stream_texture_manager.h"
namespace gpu {
namespace gles2 {
@@ -115,7 +114,6 @@ Texture::Texture(GLuint service_id)
npot_(false),
has_been_bound_(false),
framebuffer_attachment_count_(0),
- stream_texture_(false),
immutable_(false),
estimated_size_(0),
can_render_condition_(CAN_RENDER_ALWAYS) {
@@ -198,7 +196,7 @@ Texture::CanRenderCondition Texture::GetCanRenderCondition() const {
return CAN_RENDER_ALWAYS;
if (target_ == GL_TEXTURE_EXTERNAL_OES) {
- if (!IsStreamTexture()) {
+ if (!GetLevelImage(target_, 0)) {
return CAN_RENDER_NEVER;
}
} else {
@@ -803,8 +801,7 @@ TextureRef::TextureRef(TextureManager* manager,
Texture* texture)
: manager_(manager),
texture_(texture),
- client_id_(client_id),
- is_stream_texture_owner_(false) {
+ client_id_(client_id) {
DCHECK(manager_);
DCHECK(texture_);
texture_->AddTextureRef(this);
@@ -834,7 +831,6 @@ TextureManager::TextureManager(
new MemoryTypeTracker(memory_tracker, MemoryTracker::kUnmanaged)),
feature_info_(feature_info),
framebuffer_manager_(NULL),
- stream_texture_manager_(NULL),
max_texture_size_(max_texture_size),
max_cube_map_texture_size_(max_cube_map_texture_size),
max_levels_(ComputeMipMapCount(max_texture_size,
@@ -980,19 +976,6 @@ void TextureManager::SetTarget(TextureRef* ref, GLenum target) {
->SetTarget(feature_info_.get(), target, MaxLevelsForTarget(target));
}
-void TextureManager::SetStreamTexture(TextureRef* ref, bool stream_texture) {
- DCHECK(ref);
- // Only the owner can mark as non-stream texture.
- DCHECK_EQ(stream_texture, !ref->is_stream_texture_owner_);
- ref->texture()->SetStreamTexture(stream_texture);
- ref->set_is_stream_texture_owner(stream_texture);
-}
-
-bool TextureManager::IsStreamTextureOwner(TextureRef* ref) {
- DCHECK(ref);
- return ref->is_stream_texture_owner();
-}
-
void TextureManager::SetLevelCleared(TextureRef* ref,
GLenum target,
GLint level,
@@ -1139,10 +1122,6 @@ void TextureManager::StopTracking(TextureRef* ref) {
OnTextureRefDestroying(ref));
Texture* texture = ref->texture();
- if (ref->is_stream_texture_owner_ && stream_texture_manager_) {
- DCHECK(texture->IsStreamTexture());
- stream_texture_manager_->DestroyStreamTexture(texture->service_id());
- }
--texture_count_;
if (!texture->CanRender(feature_info_.get())) {

Powered by Google App Engine
This is Rietveld 408576698