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

Side by Side Diff: ui/gl/gl_image_io_surface.mm

Issue 1272393002: Add initial GLImage tracing + stubs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@trackpools
Patch Set: move generic_shared_memory_id.* Created 5 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
« no previous file with comments | « ui/gl/gl_image_io_surface.h ('k') | ui/gl/gl_image_memory.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ui/gl/gl_image_io_surface.h" 5 #include "ui/gl/gl_image_io_surface.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/mac/foundation_util.h" 10 #include "base/mac/foundation_util.h"
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 return false; 210 return false;
211 CALayer* layer = found->second; 211 CALayer* layer = found->second;
212 212
213 // Also note that transactions are not disabled. The caller must ensure that 213 // Also note that transactions are not disabled. The caller must ensure that
214 // all changes to the CALayer tree happen atomically. 214 // all changes to the CALayer tree happen atomically.
215 [layer setContents:static_cast<id>(io_surface_.get())]; 215 [layer setContents:static_cast<id>(io_surface_.get())];
216 [layer setFrame:bounds_rect.ToCGRect()]; 216 [layer setFrame:bounds_rect.ToCGRect()];
217 return true; 217 return true;
218 } 218 }
219 219
220 void GLImageIOSurface::DumpMemory(base::trace_event::ProcessMemoryDump* pmd,
221 uint64_t process_tracing_id,
222 const std::string& dump_name) {
223 // TODO(ericrk): Implement GLImage DumpMemory. crbug.com/514914
224 }
225
220 // static 226 // static
221 void GLImageIOSurface::SetLayerForWidget( 227 void GLImageIOSurface::SetLayerForWidget(
222 gfx::AcceleratedWidget widget, CALayer* layer) { 228 gfx::AcceleratedWidget widget, CALayer* layer) {
223 if (layer) 229 if (layer)
224 g_widget_to_layer_map.Pointer()->insert(std::make_pair(widget, layer)); 230 g_widget_to_layer_map.Pointer()->insert(std::make_pair(widget, layer));
225 else 231 else
226 g_widget_to_layer_map.Pointer()->erase(widget); 232 g_widget_to_layer_map.Pointer()->erase(widget);
227 } 233 }
228 234
229 } // namespace gfx 235 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gl/gl_image_io_surface.h ('k') | ui/gl/gl_image_memory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698