Commit 2919d671 authored by darin@apple.com's avatar darin@apple.com

Set eol-style to native on many source files where it was unset.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95901 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 0e500df5
// //
// Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved. // Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// //
// debug.cpp: Debugging utilities. // debug.cpp: Debugging utilities.
#include "common/debug.h" #include "common/debug.h"
#include <stdio.h> #include <stdio.h>
#include <stdarg.h> #include <stdarg.h>
#include <d3d9.h> #include <d3d9.h>
#include <windows.h> #include <windows.h>
namespace gl namespace gl
{ {
typedef void (WINAPI *PerfOutputFunction)(D3DCOLOR, LPCWSTR); typedef void (WINAPI *PerfOutputFunction)(D3DCOLOR, LPCWSTR);
static void output(bool traceFileDebugOnly, PerfOutputFunction perfFunc, const char *format, va_list vararg) static void output(bool traceFileDebugOnly, PerfOutputFunction perfFunc, const char *format, va_list vararg)
{ {
#if !defined(ANGLE_DISABLE_PERF) #if !defined(ANGLE_DISABLE_PERF)
if (perfActive()) if (perfActive())
{ {
char message[4096]; char message[4096];
int len = vsprintf_s(message, format, vararg); int len = vsprintf_s(message, format, vararg);
if (len < 0) if (len < 0)
{ {
return; return;
} }
// There are no ASCII variants of these D3DPERF functions. // There are no ASCII variants of these D3DPERF functions.
wchar_t wideMessage[4096]; wchar_t wideMessage[4096];
for (int i = 0; i < len; ++i) for (int i = 0; i < len; ++i)
{ {
wideMessage[i] = message[i]; wideMessage[i] = message[i];
} }
wideMessage[len] = 0; wideMessage[len] = 0;
perfFunc(0, wideMessage); perfFunc(0, wideMessage);
} }
#endif #endif
#if !defined(ANGLE_DISABLE_TRACE) #if !defined(ANGLE_DISABLE_TRACE)
#if defined(NDEBUG) #if defined(NDEBUG)
if (traceFileDebugOnly) if (traceFileDebugOnly)
{ {
return; return;
} }
#endif #endif
FILE* file = fopen(TRACE_OUTPUT_FILE, "a"); FILE* file = fopen(TRACE_OUTPUT_FILE, "a");
if (file) if (file)
{ {
vfprintf(file, format, vararg); vfprintf(file, format, vararg);
fclose(file); fclose(file);
} }
#endif #endif
} }
void trace(bool traceFileDebugOnly, const char *format, ...) void trace(bool traceFileDebugOnly, const char *format, ...)
{ {
va_list vararg; va_list vararg;
va_start(vararg, format); va_start(vararg, format);
output(traceFileDebugOnly, D3DPERF_SetMarker, format, vararg); output(traceFileDebugOnly, D3DPERF_SetMarker, format, vararg);
va_end(vararg); va_end(vararg);
} }
bool perfActive() bool perfActive()
{ {
#if defined(ANGLE_DISABLE_PERF) #if defined(ANGLE_DISABLE_PERF)
return false; return false;
#else #else
static bool active = D3DPERF_GetStatus() != 0; static bool active = D3DPERF_GetStatus() != 0;
return active; return active;
#endif #endif
} }
ScopedPerfEventHelper::ScopedPerfEventHelper(const char* format, ...) ScopedPerfEventHelper::ScopedPerfEventHelper(const char* format, ...)
{ {
va_list vararg; va_list vararg;
va_start(vararg, format); va_start(vararg, format);
output(true, reinterpret_cast<PerfOutputFunction>(D3DPERF_BeginEvent), format, vararg); output(true, reinterpret_cast<PerfOutputFunction>(D3DPERF_BeginEvent), format, vararg);
va_end(vararg); va_end(vararg);
} }
ScopedPerfEventHelper::~ScopedPerfEventHelper() ScopedPerfEventHelper::~ScopedPerfEventHelper()
{ {
#if !defined(ANGLE_DISABLE_PERF) #if !defined(ANGLE_DISABLE_PERF)
if (perfActive()) if (perfActive())
{ {
D3DPERF_EndEvent(); D3DPERF_EndEvent();
} }
#endif #endif
} }
} }
...@@ -42,26 +42,26 @@ void NetworkStateNotifier::updateState() ...@@ -42,26 +42,26 @@ void NetworkStateNotifier::updateState()
Vector<char> buffer; Vector<char> buffer;
DWORD size = 0; DWORD size = 0;
if (::GetAdaptersAddresses(AF_UNSPEC, 0, 0, 0, &size) != ERROR_BUFFER_OVERFLOW) if (::GetAdaptersAddresses(AF_UNSPEC, 0, 0, 0, &size) != ERROR_BUFFER_OVERFLOW)
return; return;
buffer.resize(size); buffer.resize(size);
PIP_ADAPTER_ADDRESSES addresses = reinterpret_cast<PIP_ADAPTER_ADDRESSES>(buffer.data()); PIP_ADAPTER_ADDRESSES addresses = reinterpret_cast<PIP_ADAPTER_ADDRESSES>(buffer.data());
if (::GetAdaptersAddresses(AF_UNSPEC, 0, 0, addresses, &size) != ERROR_SUCCESS) { if (::GetAdaptersAddresses(AF_UNSPEC, 0, 0, addresses, &size) != ERROR_SUCCESS) {
// We couldn't determine whether we're online or not, so assume that we are. // We couldn't determine whether we're online or not, so assume that we are.
return; return;
} }
for (; addresses; addresses = addresses->Next) { for (; addresses; addresses = addresses->Next) {
if (addresses->IfType == MIB_IF_TYPE_LOOPBACK) if (addresses->IfType == MIB_IF_TYPE_LOOPBACK)
continue; continue;
if (addresses->OperStatus != IfOperStatusUp) if (addresses->OperStatus != IfOperStatusUp)
continue; continue;
// We found an interface that was up. // We found an interface that was up.
return; return;
} }
// We didn't find any valid interfaces, so we must be offline. // We didn't find any valid interfaces, so we must be offline.
......
...@@ -21,23 +21,23 @@ ...@@ -21,23 +21,23 @@
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#include "Font.h" #include "Font.h"
#include "GlyphBuffer.h" #include "GlyphBuffer.h"
#include <wx/defs.h> #include <wx/defs.h>
#include <wx/dcclient.h> #include <wx/dcclient.h>
#if __WXGTK__ && USE(WXGC) #if __WXGTK__ && USE(WXGC)
#include <cairo.h> #include <cairo.h>
#include <pango/pango.h> #include <pango/pango.h>
#include <pango/pangocairo.h> #include <pango/pangocairo.h>
#endif #endif
namespace WebCore { namespace WebCore {
extern void drawTextWithSpacing(GraphicsContext* graphicsContext, const SimpleFontData* font, const wxColour& color, const GlyphBuffer& glyphBuffer, int from, int numGlyphs, const FloatPoint& point); extern void drawTextWithSpacing(GraphicsContext* graphicsContext, const SimpleFontData* font, const wxColour& color, const GlyphBuffer& glyphBuffer, int from, int numGlyphs, const FloatPoint& point);
#if __WXGTK__ && USE(WXGC) #if __WXGTK__ && USE(WXGC)
PangoFontMap* pangoFontMap(); PangoFontMap* pangoFontMap();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment