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

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

Issue 2668903003: Replace WTF::emptyString{16Bit}() with a static global (Closed)
Patch Set: Replace WTF::emptyString{16Bit}() with a static global 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 7539 matching lines...) Expand 10 before | Expand all | Expand 10 after
7550 WebGLContextEvent* event = WebGLContextEvent::create( 7550 WebGLContextEvent* event = WebGLContextEvent::create(
7551 EventTypeNames::webglcontextrestored, false, true, ""); 7551 EventTypeNames::webglcontextrestored, false, true, "");
7552 if (canvas()) 7552 if (canvas())
7553 canvas()->dispatchEvent(event); 7553 canvas()->dispatchEvent(event);
7554 else 7554 else
7555 offscreenCanvas()->dispatchEvent(event); 7555 offscreenCanvas()->dispatchEvent(event);
7556 } 7556 }
7557 7557
7558 String WebGLRenderingContextBase::ensureNotNull(const String& text) const { 7558 String WebGLRenderingContextBase::ensureNotNull(const String& text) const {
7559 if (text.isNull()) 7559 if (text.isNull())
7560 return WTF::emptyString(); 7560 return WTF::emptyString;
7561 return text; 7561 return text;
7562 } 7562 }
7563 7563
7564 WebGLRenderingContextBase::LRUImageBufferCache::LRUImageBufferCache( 7564 WebGLRenderingContextBase::LRUImageBufferCache::LRUImageBufferCache(
7565 int capacity) 7565 int capacity)
7566 : m_buffers(wrapArrayUnique(new std::unique_ptr<ImageBuffer>[ capacity ])), 7566 : m_buffers(wrapArrayUnique(new std::unique_ptr<ImageBuffer>[ capacity ])),
7567 m_capacity(capacity) {} 7567 m_capacity(capacity) {}
7568 7568
7569 ImageBuffer* WebGLRenderingContextBase::LRUImageBufferCache::imageBuffer( 7569 ImageBuffer* WebGLRenderingContextBase::LRUImageBufferCache::imageBuffer(
7570 const IntSize& size) { 7570 const IntSize& size) {
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
7838 7838
7839 void WebGLRenderingContextBase::getHTMLOrOffscreenCanvas( 7839 void WebGLRenderingContextBase::getHTMLOrOffscreenCanvas(
7840 HTMLCanvasElementOrOffscreenCanvas& result) const { 7840 HTMLCanvasElementOrOffscreenCanvas& result) const {
7841 if (canvas()) 7841 if (canvas())
7842 result.setHTMLCanvasElement(canvas()); 7842 result.setHTMLCanvasElement(canvas());
7843 else 7843 else
7844 result.setOffscreenCanvas(offscreenCanvas()); 7844 result.setOffscreenCanvas(offscreenCanvas());
7845 } 7845 }
7846 7846
7847 } // namespace blink 7847 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/webgl/GLStringQuery.h ('k') | third_party/WebKit/Source/modules/webmidi/MIDIPort.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698