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

Side by Side Diff: content/common/gpu/stream_texture_android.cc

Issue 301793003: During image destroy, delete textures only if we have a GL context. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: resolve android clang dbg build issue. Created 6 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/common/gpu/stream_texture_android.h" 5 #include "content/common/gpu/stream_texture_android.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "content/common/android/surface_texture_peer.h" 8 #include "content/common/android/surface_texture_peer.h"
9 #include "content/common/gpu/gpu_channel.h" 9 #include "content/common/gpu/gpu_channel.h"
10 #include "content/common/gpu/gpu_messages.h" 10 #include "content/common/gpu/gpu_messages.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 void StreamTexture::OnWillDestroyStub() { 88 void StreamTexture::OnWillDestroyStub() {
89 owner_stub_->RemoveDestructionObserver(this); 89 owner_stub_->RemoveDestructionObserver(this);
90 owner_stub_->channel()->RemoveRoute(route_id_); 90 owner_stub_->channel()->RemoveRoute(route_id_);
91 owner_stub_ = NULL; 91 owner_stub_ = NULL;
92 92
93 // If the owner goes away, there is no need to keep the SurfaceTexture around. 93 // If the owner goes away, there is no need to keep the SurfaceTexture around.
94 // The GL texture will keep working regardless with the currently bound frame. 94 // The GL texture will keep working regardless with the currently bound frame.
95 surface_texture_ = NULL; 95 surface_texture_ = NULL;
96 } 96 }
97 97
98 void StreamTexture::Destroy() { 98 void StreamTexture::Destroy(bool have_context) {
99 NOTREACHED(); 99 NOTREACHED();
100 } 100 }
101 101
102 void StreamTexture::WillUseTexImage() { 102 void StreamTexture::WillUseTexImage() {
103 if (!owner_stub_ || !surface_texture_.get()) 103 if (!owner_stub_ || !surface_texture_.get())
104 return; 104 return;
105 105
106 if (has_pending_frame_) { 106 if (has_pending_frame_) {
107 scoped_ptr<ui::ScopedMakeCurrent> scoped_make_current; 107 scoped_ptr<ui::ScopedMakeCurrent> scoped_make_current;
108 bool needs_make_current = 108 bool needs_make_current =
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 bool StreamTexture::BindTexImage(unsigned target) { 196 bool StreamTexture::BindTexImage(unsigned target) {
197 NOTREACHED(); 197 NOTREACHED();
198 return false; 198 return false;
199 } 199 }
200 200
201 void StreamTexture::ReleaseTexImage(unsigned target) { 201 void StreamTexture::ReleaseTexImage(unsigned target) {
202 NOTREACHED(); 202 NOTREACHED();
203 } 203 }
204 204
205 } // namespace content 205 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/stream_texture_android.h ('k') | gpu/command_buffer/service/gles2_cmd_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698