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

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

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 #ifndef CONTENT_COMMON_GPU_STREAM_TEXTURE_ANDROID_H_ 5 #ifndef CONTENT_COMMON_GPU_STREAM_TEXTURE_ANDROID_H_
6 #define CONTENT_COMMON_GPU_STREAM_TEXTURE_ANDROID_H_ 6 #define CONTENT_COMMON_GPU_STREAM_TEXTURE_ANDROID_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "content/common/gpu/gpu_command_buffer_stub.h" 10 #include "content/common/gpu/gpu_command_buffer_stub.h"
(...skipping 15 matching lines...) Expand all
26 uint32 client_texture_id, 26 uint32 client_texture_id,
27 int stream_id); 27 int stream_id);
28 28
29 private: 29 private:
30 StreamTexture(GpuCommandBufferStub* owner_stub, 30 StreamTexture(GpuCommandBufferStub* owner_stub,
31 int32 route_id, 31 int32 route_id,
32 uint32 texture_id); 32 uint32 texture_id);
33 virtual ~StreamTexture(); 33 virtual ~StreamTexture();
34 34
35 // gfx::GLImage implementation: 35 // gfx::GLImage implementation:
36 virtual void Destroy() OVERRIDE; 36 virtual void Destroy(bool have_context) OVERRIDE;
37 virtual gfx::Size GetSize() OVERRIDE; 37 virtual gfx::Size GetSize() OVERRIDE;
38 virtual bool BindTexImage(unsigned target) OVERRIDE; 38 virtual bool BindTexImage(unsigned target) OVERRIDE;
39 virtual void ReleaseTexImage(unsigned target) OVERRIDE; 39 virtual void ReleaseTexImage(unsigned target) OVERRIDE;
40 virtual void WillUseTexImage() OVERRIDE; 40 virtual void WillUseTexImage() OVERRIDE;
41 virtual void DidUseTexImage() OVERRIDE {} 41 virtual void DidUseTexImage() OVERRIDE {}
42 virtual void WillModifyTexImage() OVERRIDE {} 42 virtual void WillModifyTexImage() OVERRIDE {}
43 virtual void DidModifyTexImage() OVERRIDE {} 43 virtual void DidModifyTexImage() OVERRIDE {}
44 44
45 // GpuCommandBufferStub::DestructionObserver implementation. 45 // GpuCommandBufferStub::DestructionObserver implementation.
46 virtual void OnWillDestroyStub() OVERRIDE; 46 virtual void OnWillDestroyStub() OVERRIDE;
(...skipping 27 matching lines...) Expand all
74 int32 route_id_; 74 int32 route_id_;
75 bool has_listener_; 75 bool has_listener_;
76 76
77 base::WeakPtrFactory<StreamTexture> weak_factory_; 77 base::WeakPtrFactory<StreamTexture> weak_factory_;
78 DISALLOW_COPY_AND_ASSIGN(StreamTexture); 78 DISALLOW_COPY_AND_ASSIGN(StreamTexture);
79 }; 79 };
80 80
81 } // namespace content 81 } // namespace content
82 82
83 #endif // CONTENT_COMMON_GPU_STREAM_TEXTURE_ANDROID_H_ 83 #endif // CONTENT_COMMON_GPU_STREAM_TEXTURE_ANDROID_H_
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_command_buffer_stub.cc ('k') | content/common/gpu/stream_texture_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698