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

Side by Side Diff: cc/output/output_surface.cc

Issue 1998723002: Move code in ui/gl/* from gfx:: to gl:: (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 7 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 "cc/output/output_surface.h" 5 #include "cc/output/output_surface.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/location.h" 10 #include "base/location.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 62
63 // For uniformity, skia provides this value as a string. Convert back to a 63 // For uniformity, skia provides this value as a string. Convert back to a
64 // uint32_t. 64 // uint32_t.
65 uint32_t gl_id = 65 uint32_t gl_id =
66 std::strtoul(backing_object_id, nullptr /* str_end */, 10 /* base */); 66 std::strtoul(backing_object_id, nullptr /* str_end */, 10 /* base */);
67 67
68 // Populated in if statements below. 68 // Populated in if statements below.
69 base::trace_event::MemoryAllocatorDumpGuid guid; 69 base::trace_event::MemoryAllocatorDumpGuid guid;
70 70
71 if (strcmp(backing_type, kGLTextureBackingType) == 0) { 71 if (strcmp(backing_type, kGLTextureBackingType) == 0) {
72 guid = gfx::GetGLTextureClientGUIDForTracing(share_group_tracing_guid_, 72 guid = gl::GetGLTextureClientGUIDForTracing(share_group_tracing_guid_,
73 gl_id); 73 gl_id);
74 } else if (strcmp(backing_type, kGLBufferBackingType) == 0) { 74 } else if (strcmp(backing_type, kGLBufferBackingType) == 0) {
75 guid = gfx::GetGLBufferGUIDForTracing(tracing_process_id, gl_id); 75 guid = gl::GetGLBufferGUIDForTracing(tracing_process_id, gl_id);
76 } else if (strcmp(backing_type, kGLRenderbufferBackingType) == 0) { 76 } else if (strcmp(backing_type, kGLRenderbufferBackingType) == 0) {
77 guid = gfx::GetGLRenderbufferGUIDForTracing(tracing_process_id, gl_id); 77 guid = gl::GetGLRenderbufferGUIDForTracing(tracing_process_id, gl_id);
78 } 78 }
79 79
80 if (!guid.empty()) { 80 if (!guid.empty()) {
81 pmd_->CreateSharedGlobalAllocatorDump(guid); 81 pmd_->CreateSharedGlobalAllocatorDump(guid);
82 82
83 auto* dump = GetOrCreateAllocatorDump(dump_name); 83 auto* dump = GetOrCreateAllocatorDump(dump_name);
84 84
85 const int kImportance = 2; 85 const int kImportance = 2;
86 pmd_->AddOwnershipEdge(dump->guid(), guid, kImportance); 86 pmd_->AddOwnershipEdge(dump->guid(), guid, kImportance);
87 } 87 }
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 if (context_provider_.get()) { 328 if (context_provider_.get()) {
329 context_provider_->SetLostContextCallback( 329 context_provider_->SetLostContextCallback(
330 ContextProvider::LostContextCallback()); 330 ContextProvider::LostContextCallback());
331 } 331 }
332 context_provider_ = nullptr; 332 context_provider_ = nullptr;
333 client_ = nullptr; 333 client_ = nullptr;
334 weak_ptr_factory_.InvalidateWeakPtrs(); 334 weak_ptr_factory_.InvalidateWeakPtrs();
335 } 335 }
336 336
337 } // namespace cc 337 } // namespace cc
OLDNEW
« no previous file with comments | « blimp/client/feature/compositor/blimp_context_provider.cc ('k') | cc/resources/resource_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698