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

Side by Side Diff: cc/resources/resource_provider.cc

Issue 609663003: cc: Remove use of PassAs() and constructor-casting with scoped_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cc-passas: PassAs-presubmit-warning Created 6 years, 2 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 | « cc/resources/raster_worker_pool_unittest.cc ('k') | cc/resources/resource_provider_unittest.cc » ('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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/resources/resource_provider.h" 5 #include "cc/resources/resource_provider.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 9
10 #include "base/containers/hash_tables.h" 10 #include "base/containers/hash_tables.h"
(...skipping 1084 matching lines...) Expand 10 before | Expand all | Expand 10 after
1095 DCHECK(gl); 1095 DCHECK(gl);
1096 #if DCHECK_IS_ON 1096 #if DCHECK_IS_ON
1097 // Check that all GL resources has been deleted. 1097 // Check that all GL resources has been deleted.
1098 for (ResourceMap::const_iterator itr = resources_.begin(); 1098 for (ResourceMap::const_iterator itr = resources_.begin();
1099 itr != resources_.end(); 1099 itr != resources_.end();
1100 ++itr) { 1100 ++itr) {
1101 DCHECK_NE(GLTexture, itr->second.type); 1101 DCHECK_NE(GLTexture, itr->second.type);
1102 } 1102 }
1103 #endif // DCHECK_IS_ON 1103 #endif // DCHECK_IS_ON
1104 1104
1105 texture_uploader_.reset(); 1105 texture_uploader_ = nullptr;
1106 texture_id_allocator_.reset(); 1106 texture_id_allocator_ = nullptr;
1107 buffer_id_allocator_.reset(); 1107 buffer_id_allocator_ = nullptr;
1108 gl->Finish(); 1108 gl->Finish();
1109 } 1109 }
1110 1110
1111 int ResourceProvider::CreateChild(const ReturnCallback& return_callback) { 1111 int ResourceProvider::CreateChild(const ReturnCallback& return_callback) {
1112 DCHECK(thread_checker_.CalledOnValidThread()); 1112 DCHECK(thread_checker_.CalledOnValidThread());
1113 1113
1114 Child child_info; 1114 Child child_info;
1115 child_info.return_callback = return_callback; 1115 child_info.return_callback = return_callback;
1116 1116
1117 int child = next_child_++; 1117 int child = next_child_++;
(...skipping 955 matching lines...) Expand 10 before | Expand all | Expand 10 after
2073 ContextProvider* context_provider = output_surface_->context_provider(); 2073 ContextProvider* context_provider = output_surface_->context_provider();
2074 return context_provider ? context_provider->ContextGL() : NULL; 2074 return context_provider ? context_provider->ContextGL() : NULL;
2075 } 2075 }
2076 2076
2077 class GrContext* ResourceProvider::GrContext() const { 2077 class GrContext* ResourceProvider::GrContext() const {
2078 ContextProvider* context_provider = output_surface_->context_provider(); 2078 ContextProvider* context_provider = output_surface_->context_provider();
2079 return context_provider ? context_provider->GrContext() : NULL; 2079 return context_provider ? context_provider->GrContext() : NULL;
2080 } 2080 }
2081 2081
2082 } // namespace cc 2082 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/raster_worker_pool_unittest.cc ('k') | cc/resources/resource_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698