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

Side by Side Diff: Source/core/html/canvas/WebGLRenderingContext.cpp

Issue 14482004: Remove OS(QNX) support. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 8 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 | « no previous file | Source/wtf/Atomics.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3417 matching lines...) Expand 10 before | Expand all | Expand 10 after
3428 void* data = pixels->baseAddress(); 3428 void* data = pixels->baseAddress();
3429 3429
3430 { 3430 {
3431 ScopedDrawingBufferBinder binder(m_drawingBuffer.get(), m_framebufferBin ding.get()); 3431 ScopedDrawingBufferBinder binder(m_drawingBuffer.get(), m_framebufferBin ding.get());
3432 if (m_isRobustnessEXTSupported) 3432 if (m_isRobustnessEXTSupported)
3433 m_context->getExtensions()->readnPixelsEXT(x, y, width, height, form at, type, pixels->byteLength(), data); 3433 m_context->getExtensions()->readnPixelsEXT(x, y, width, height, form at, type, pixels->byteLength(), data);
3434 else 3434 else
3435 m_context->readPixels(x, y, width, height, format, type, data); 3435 m_context->readPixels(x, y, width, height, format, type, data);
3436 } 3436 }
3437 3437
3438 #if OS(DARWIN) || OS(QNX) 3438 #if OS(DARWIN)
3439 if (m_isRobustnessEXTSupported) // we haven't computed padding 3439 if (m_isRobustnessEXTSupported) // we haven't computed padding
3440 m_context->computeImageSizeInBytes(format, type, width, height, m_packAl ignment, &totalBytesRequired, &padding); 3440 m_context->computeImageSizeInBytes(format, type, width, height, m_packAl ignment, &totalBytesRequired, &padding);
3441 // FIXME: remove this section when GL driver bug on Mac AND the GLES driver bug 3441 // FIXME: remove this section when GL driver bug on Mac is fixed, i.e.,
3442 // on QC & Imagination QNX is fixed, i.e., when alpha is off, readPixels sho uld 3442 // when alpha is off, readPixels should set alpha to 255 instead of 0.
3443 // set alpha to 255 instead of 0.
3444 if (!m_framebufferBinding && !m_context->getContextAttributes().alpha) { 3443 if (!m_framebufferBinding && !m_context->getContextAttributes().alpha) {
3445 unsigned char* pixels = reinterpret_cast<unsigned char*>(data); 3444 unsigned char* pixels = reinterpret_cast<unsigned char*>(data);
3446 for (GC3Dsizei iy = 0; iy < height; ++iy) { 3445 for (GC3Dsizei iy = 0; iy < height; ++iy) {
3447 for (GC3Dsizei ix = 0; ix < width; ++ix) { 3446 for (GC3Dsizei ix = 0; ix < width; ++ix) {
3448 pixels[3] = 255; 3447 pixels[3] = 255;
3449 pixels += 4; 3448 pixels += 4;
3450 } 3449 }
3451 pixels += padding; 3450 pixels += padding;
3452 } 3451 }
3453 } 3452 }
(...skipping 2524 matching lines...) Expand 10 before | Expand all | Expand 10 after
5978 bool WebGLRenderingContext::supportsDrawBuffers() 5977 bool WebGLRenderingContext::supportsDrawBuffers()
5979 { 5978 {
5980 if (!m_drawBuffersWebGLRequirementsChecked) { 5979 if (!m_drawBuffersWebGLRequirementsChecked) {
5981 m_drawBuffersWebGLRequirementsChecked = true; 5980 m_drawBuffersWebGLRequirementsChecked = true;
5982 m_drawBuffersSupported = EXTDrawBuffers::supported(this); 5981 m_drawBuffersSupported = EXTDrawBuffers::supported(this);
5983 } 5982 }
5984 return m_drawBuffersSupported; 5983 return m_drawBuffersSupported;
5985 } 5984 }
5986 5985
5987 } // namespace WebCore 5986 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | Source/wtf/Atomics.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698