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

Side by Side Diff: gpu/command_buffer/service/stream_texture_manager_in_process_android.cc

Issue 1830453002: WebGL: GL_RGB emulation for IOSurface backed textures. [For reference only] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Compile error. Created 4 years, 8 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 "gpu/command_buffer/service/stream_texture_manager_in_process_android.h " 5 #include "gpu/command_buffer/service/stream_texture_manager_in_process_android.h "
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 27 matching lines...) Expand all
38 const gfx::Point& offset, 38 const gfx::Point& offset,
39 const gfx::Rect& rect) override; 39 const gfx::Rect& rect) override;
40 bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget, 40 bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget,
41 int z_order, 41 int z_order,
42 gfx::OverlayTransform transform, 42 gfx::OverlayTransform transform,
43 const gfx::Rect& bounds_rect, 43 const gfx::Rect& bounds_rect,
44 const gfx::RectF& crop_rect) override; 44 const gfx::RectF& crop_rect) override;
45 void OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd, 45 void OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd,
46 uint64_t process_tracing_id, 46 uint64_t process_tracing_id,
47 const std::string& dump_name) override; 47 const std::string& dump_name) override;
48 bool EmulatingRGB() const override;
48 49
49 private: 50 private:
50 ~GLImageImpl() override; 51 ~GLImageImpl() override;
51 52
52 uint32_t texture_id_; 53 uint32_t texture_id_;
53 gles2::TextureManager* texture_manager_; 54 gles2::TextureManager* texture_manager_;
54 scoped_refptr<gfx::SurfaceTexture> surface_texture_; 55 scoped_refptr<gfx::SurfaceTexture> surface_texture_;
55 base::Closure release_callback_; 56 base::Closure release_callback_;
56 57
57 DISALLOW_COPY_AND_ASSIGN(GLImageImpl); 58 DISALLOW_COPY_AND_ASSIGN(GLImageImpl);
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 NOTREACHED(); 134 NOTREACHED();
134 return false; 135 return false;
135 } 136 }
136 137
137 void GLImageImpl::OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd, 138 void GLImageImpl::OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd,
138 uint64_t process_tracing_id, 139 uint64_t process_tracing_id,
139 const std::string& dump_name) { 140 const std::string& dump_name) {
140 // TODO(ericrk): Implement GLImage OnMemoryDump. crbug.com/514914 141 // TODO(ericrk): Implement GLImage OnMemoryDump. crbug.com/514914
141 } 142 }
142 143
144 bool GLImageImpl::EmulatingRGB() const {
145 return false;
146 }
147
143 } // anonymous namespace 148 } // anonymous namespace
144 149
145 StreamTextureManagerInProcess::StreamTextureManagerInProcess() 150 StreamTextureManagerInProcess::StreamTextureManagerInProcess()
146 : next_id_(1), weak_factory_(this) {} 151 : next_id_(1), weak_factory_(this) {}
147 152
148 StreamTextureManagerInProcess::~StreamTextureManagerInProcess() { 153 StreamTextureManagerInProcess::~StreamTextureManagerInProcess() {
149 if (!textures_.empty()) { 154 if (!textures_.empty()) {
150 LOG(WARNING) << "Undestroyed surface textures while tearing down " 155 LOG(WARNING) << "Undestroyed surface textures while tearing down "
151 "StreamTextureManager."; 156 "StreamTextureManager.";
152 } 157 }
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 StreamTextureManagerInProcess::GetSurfaceTexture(uint32_t stream_id) { 210 StreamTextureManagerInProcess::GetSurfaceTexture(uint32_t stream_id) {
206 base::AutoLock lock(map_lock_); 211 base::AutoLock lock(map_lock_);
207 TextureMap::const_iterator it = textures_.find(stream_id); 212 TextureMap::const_iterator it = textures_.find(stream_id);
208 if (it != textures_.end()) 213 if (it != textures_.end())
209 return it->second; 214 return it->second;
210 215
211 return NULL; 216 return NULL;
212 } 217 }
213 218
214 } // namespace gpu 219 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/image_factory.cc ('k') | gpu/command_buffer/service/texture_definition.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698