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

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

Issue 2470233009: WTF/std normalization: replace WTF::Vector::first() with ::front() (Closed)
Patch Set: rebase Created 4 years 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 2735 matching lines...) Expand 10 before | Expand all | Expand 10 after
2746 // underlying context/drawing buffer and adjust accordingly. 2746 // underlying context/drawing buffer and adjust accordingly.
2747 if (creationAttributes().depth() && !drawingBuffer()->hasDepthBuffer()) 2747 if (creationAttributes().depth() && !drawingBuffer()->hasDepthBuffer())
2748 result.get().setDepth(false); 2748 result.get().setDepth(false);
2749 if (creationAttributes().stencil() && !drawingBuffer()->hasStencilBuffer()) 2749 if (creationAttributes().stencil() && !drawingBuffer()->hasStencilBuffer())
2750 result.get().setStencil(false); 2750 result.get().setStencil(false);
2751 result.get().setAntialias(drawingBuffer()->multisample()); 2751 result.get().setAntialias(drawingBuffer()->multisample());
2752 } 2752 }
2753 2753
2754 GLenum WebGLRenderingContextBase::getError() { 2754 GLenum WebGLRenderingContextBase::getError() {
2755 if (!m_lostContextErrors.isEmpty()) { 2755 if (!m_lostContextErrors.isEmpty()) {
2756 GLenum error = m_lostContextErrors.first(); 2756 GLenum error = m_lostContextErrors.front();
2757 m_lostContextErrors.remove(0); 2757 m_lostContextErrors.remove(0);
2758 return error; 2758 return error;
2759 } 2759 }
2760 2760
2761 if (isContextLost()) 2761 if (isContextLost())
2762 return GL_NO_ERROR; 2762 return GL_NO_ERROR;
2763 2763
2764 if (!m_syntheticErrors.isEmpty()) { 2764 if (!m_syntheticErrors.isEmpty()) {
2765 GLenum error = m_syntheticErrors.first(); 2765 GLenum error = m_syntheticErrors.front();
2766 m_syntheticErrors.remove(0); 2766 m_syntheticErrors.remove(0);
2767 return error; 2767 return error;
2768 } 2768 }
2769 2769
2770 return contextGL()->GetError(); 2770 return contextGL()->GetError();
2771 } 2771 }
2772 2772
2773 const char* const* WebGLRenderingContextBase::ExtensionTracker::prefixes() 2773 const char* const* WebGLRenderingContextBase::ExtensionTracker::prefixes()
2774 const { 2774 const {
2775 static const char* const unprefixed[] = { 2775 static const char* const unprefixed[] = {
(...skipping 4988 matching lines...) Expand 10 before | Expand all | Expand 10 after
7764 7764
7765 void WebGLRenderingContextBase::getHTMLOrOffscreenCanvas( 7765 void WebGLRenderingContextBase::getHTMLOrOffscreenCanvas(
7766 HTMLCanvasElementOrOffscreenCanvas& result) const { 7766 HTMLCanvasElementOrOffscreenCanvas& result) const {
7767 if (canvas()) 7767 if (canvas())
7768 result.setHTMLCanvasElement(canvas()); 7768 result.setHTMLCanvasElement(canvas());
7769 else 7769 else
7770 result.setOffscreenCanvas(getOffscreenCanvas()); 7770 result.setOffscreenCanvas(getOffscreenCanvas());
7771 } 7771 }
7772 7772
7773 } // namespace blink 7773 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698