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

Side by Side Diff: third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp

Issue 2709033003: Migrate WTF::HashMap::get() to ::at() (Closed)
Patch Set: rebase Created 3 years, 10 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 /* 1 /*
2 * Copyright (C) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 return candidate; 196 return candidate;
197 } 197 }
198 198
199 WebGLRenderingContextBase* WebGLRenderingContextBase::oldestEvictedContext() { 199 WebGLRenderingContextBase* WebGLRenderingContextBase::oldestEvictedContext() {
200 if (forciblyEvictedContexts().isEmpty()) 200 if (forciblyEvictedContexts().isEmpty())
201 return nullptr; 201 return nullptr;
202 202
203 WebGLRenderingContextBase* candidate = nullptr; 203 WebGLRenderingContextBase* candidate = nullptr;
204 int generation = -1; 204 int generation = -1;
205 for (WebGLRenderingContextBase* context : forciblyEvictedContexts().keys()) { 205 for (WebGLRenderingContextBase* context : forciblyEvictedContexts().keys()) {
206 if (!candidate || forciblyEvictedContexts().get(context) < generation) { 206 if (!candidate || forciblyEvictedContexts().at(context) < generation) {
207 candidate = context; 207 candidate = context;
208 generation = forciblyEvictedContexts().get(context); 208 generation = forciblyEvictedContexts().at(context);
209 } 209 }
210 } 210 }
211 211
212 return candidate; 212 return candidate;
213 } 213 }
214 214
215 void WebGLRenderingContextBase::activateContext( 215 void WebGLRenderingContextBase::activateContext(
216 WebGLRenderingContextBase* context) { 216 WebGLRenderingContextBase* context) {
217 unsigned maxGLContexts = currentMaxGLContexts(); 217 unsigned maxGLContexts = currentMaxGLContexts();
218 unsigned removedContexts = 0; 218 unsigned removedContexts = 0;
(...skipping 7617 matching lines...) Expand 10 before | Expand all | Expand 10 after
7836 7836
7837 void WebGLRenderingContextBase::getHTMLOrOffscreenCanvas( 7837 void WebGLRenderingContextBase::getHTMLOrOffscreenCanvas(
7838 HTMLCanvasElementOrOffscreenCanvas& result) const { 7838 HTMLCanvasElementOrOffscreenCanvas& result) const {
7839 if (canvas()) 7839 if (canvas())
7840 result.setHTMLCanvasElement(canvas()); 7840 result.setHTMLCanvasElement(canvas());
7841 else 7841 else
7842 result.setOffscreenCanvas(offscreenCanvas()); 7842 result.setOffscreenCanvas(offscreenCanvas());
7843 } 7843 }
7844 7844
7845 } // namespace blink 7845 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/webdatabase/QuotaTracker.cpp ('k') | third_party/WebKit/Source/modules/webusb/USB.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698