Changeset 149824 in webkit
- Timestamp:
- May 9, 2013 11:13:53 AM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r149823 r149824 1 2013-05-09 Mike Fenton <mifenton@rim.com> 2 3 [BlackBerry] Style updates required based on new check-webkit-style 4 https://bugs.webkit.org/show_bug.cgi?id=115857 5 6 Reviewed by Rob Buis. 7 8 Update WebCore/platform/graphics BlackBerry sources 9 to match check-webkit-style updates. 10 11 Internally reviewed by Jakob Petsovits. 12 13 * platform/graphics/blackberry/CanvasLayerWebKitThread.cpp: 14 * platform/graphics/blackberry/GraphicsContext3DBlackBerry.cpp: 15 (WebCore::GraphicsContext3D::readPixelsIMG): 16 (WebCore::GraphicsContext3D::paintToCanvas): 17 * platform/graphics/blackberry/GraphicsLayerBlackBerry.cpp: 18 (WebCore::GraphicsLayerBlackBerry::updateLayerPosition): 19 * platform/graphics/blackberry/IntRectBlackBerry.cpp: 20 (WebCore::IntRect::IntRect): 21 * platform/graphics/blackberry/LayerCompositingThread.h: 22 (WTF::::deref): 23 * platform/graphics/blackberry/LayerFilterRenderer.cpp: 24 (WebCore::LayerFilterRenderer::initializeSharedGLObjects): 25 (WebCore::LayerFilterRenderer::actionsForOperations): 26 (WebCore::LayerFilterRenderer::applyActions): 27 * platform/graphics/blackberry/LayerRenderer.cpp: 28 (WebCore::LayerRenderer::setViewport): 29 (WebCore::LayerRenderer::compositeBuffer): 30 (WebCore::LayerRenderer::drawColor): 31 (WebCore::LayerRenderer::compositeLayersRecursive): 32 * platform/graphics/blackberry/LayerWebKitThread.cpp: 33 (WebCore::LayerWebKitThread::setFrame): 34 * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp: 35 (WebCore::MediaPlayerPrivate::play): 36 (WebCore::MediaPlayerPrivate::waitMetadataTimerFired): 37 * platform/image-decoders/blackberry/JPEGImageDecoder.cpp: 38 (WebCore::JPEGImageDecoder::JPEGImageDecoder): 39 1 40 2013-05-09 Mike Fenton <mifenton@rim.com> 2 41 -
trunk/Source/WebCore/platform/graphics/blackberry/CanvasLayerWebKitThread.cpp
r148881 r149824 19 19 #include "config.h" 20 20 #include "CanvasLayerWebKitThread.h" 21 21 22 #include "LayerCompositingThread.h" 22 23 -
trunk/Source/WebCore/platform/graphics/blackberry/GraphicsContext3DBlackBerry.cpp
r148881 r149824 280 280 281 281 // Calculate the strides of our data and canvas 282 unsigned intformatSize = 4; // RGBA UNSIGNED_BYTE283 unsigned intdataStride = width * formatSize;284 unsigned intcanvasStride = m_currentWidth * formatSize;282 unsigned formatSize = 4; // RGBA UNSIGNED_BYTE 283 unsigned dataStride = width * formatSize; 284 unsigned canvasStride = m_currentWidth * formatSize; 285 285 286 286 // If we are using a pack alignment of 8, then we need to align our strides to 8 byte boundaries … … 312 312 IntRect nonZeroDataRect = intersection(dataRect, canvasRect); 313 313 314 unsigned intxDataOffset = x < 0 ? -x * formatSize : 0;315 unsigned intyDataOffset = y < 0 ? -y * dataStride : 0;316 unsigned intxCanvasOffset = nonZeroDataRect.x() * formatSize;317 unsigned intyCanvasOffset = nonZeroDataRect.y() * canvasStride;314 unsigned xDataOffset = x < 0 ? -x * formatSize : 0; 315 unsigned yDataOffset = y < 0 ? -y * dataStride : 0; 316 unsigned xCanvasOffset = nonZeroDataRect.x() * formatSize; 317 unsigned yCanvasOffset = nonZeroDataRect.y() * canvasStride; 318 318 unsigned char* dst = static_cast<unsigned char*>(data) + xDataOffset + yDataOffset; 319 319 unsigned char* src = canvasData + xCanvasOffset + yCanvasOffset; … … 361 361 362 362 void GraphicsContext3D::paintToCanvas(const unsigned char* imagePixels, int imageWidth, int imageHeight, int canvasWidth, int canvasHeight, 363 363 GraphicsContext* context) 364 364 { 365 365 FloatRect src(0, 0, canvasWidth, canvasHeight); -
trunk/Source/WebCore/platform/graphics/blackberry/GraphicsLayerBlackBerry.cpp
r146499 r149824 662 662 { 663 663 // Position is offset on the layer by the layer anchor point. 664 FloatPoint layerPosition(m_position.x() + m_anchorPoint.x() * m_size.width(), 665 m_position.y() + m_anchorPoint.y() * m_size.height()); 664 FloatPoint layerPosition( 665 m_position.x() + m_anchorPoint.x() * m_size.width(), 666 m_position.y() + m_anchorPoint.y() * m_size.height()); 666 667 667 668 primaryLayer()->setPosition(layerPosition); -
trunk/Source/WebCore/platform/graphics/blackberry/IntRectBlackBerry.cpp
r108245 r149824 25 25 26 26 IntRect::IntRect(const BlackBerry::Platform::IntRect& rect) 27 27 : m_location(rect.x(), rect.y()), m_size(rect.width(), rect.height()) 28 28 { 29 29 } -
trunk/Source/WebCore/platform/graphics/blackberry/LayerCompositingThread.h
r148129 r149824 291 291 // Delete on the compositing thread. 292 292 BlackBerry::Platform::GuardedPointerDeleter::deleteOnThread( 293 294 293 BlackBerry::Platform::userInterfaceThreadMessageClient(), 294 static_cast<WebCore::LayerCompositingThread*>(this)); 295 295 } 296 296 } -
trunk/Source/WebCore/platform/graphics/blackberry/LayerFilterRenderer.cpp
r148423 r149824 354 354 "uniform lowp sampler2D s_texture;\n"\ 355 355 "uniform highp float u_amount;\n"\ 356 356 #x\ 357 357 "void main(void)\n { gl_FragColor = shade(texture2D(s_texture, v_texCoord)); }" 358 358 … … 365 365 "uniform highp float u_blurSize;\n"\ 366 366 "const float pi = 3.1415927;\n"\ 367 367 #x\ 368 368 "void main(void)\n"\ 369 369 "{\n"\ … … 397 397 lowp float amount = 1.0 - u_amount; 398 398 return vec4((0.2126 + 0.7874 * amount) * color.r + (0.7152 - 0.7152 * amount) * color.g + (0.0722 - 0.0722 * amount) * color.b, 399 400 401 399 (0.2126 - 0.2126 * amount) * color.r + (0.7152 + 0.2848 * amount) * color.g + (0.0722 - 0.0722 * amount) * color.b, 400 (0.2126 - 0.2126 * amount) * color.r + (0.7152 - 0.7152 * amount) * color.g + (0.0722 + 0.9278 * amount) * color.b, 401 color.a); 402 402 } 403 403 ); … … 408 408 lowp float amount = 1.0 - u_amount; 409 409 return vec4((0.393 + 0.607 * amount) * color.r + (0.769 - 0.769 * amount) * color.g + (0.189 - 0.189 * amount) * color.b, 410 411 412 413 410 (0.349 - 0.349 * amount) * color.r + (0.686 + 0.314 * amount) * color.g + (0.168 - 0.168 * amount) * color.b, 411 (0.272 - 0.272 * amount) * color.r + (0.534 - 0.534 * amount) * color.g + (0.131 + 0.869 * amount) * color.b, 412 color.a); 413 } 414 414 ); 415 415 … … 418 418 { 419 419 return vec4((0.213 + 0.787 * u_amount) * color.r + (0.715 - 0.715 * u_amount) * color.g + (0.072 - 0.072 * u_amount) * color.b, 420 421 422 420 (0.213 - 0.213 * u_amount) * color.r + (0.715 + 0.285 * u_amount) * color.g + (0.072 - 0.072 * u_amount) * color.b, 421 (0.213 - 0.213 * u_amount) * color.r + (0.715 - 0.715 * u_amount) * color.g + (0.072 + 0.928 * u_amount) * color.b, 422 color.a); 423 423 } 424 424 ); … … 431 431 highp float s = sin(u_amount * pi / 180.0); 432 432 return vec4(color.r * (0.213 + c * 0.787 - s * 0.213) + color.g * (0.715 - c * 0.715 - s * 0.715) + color.b * (0.072 - c * 0.072 + s * 0.928), 433 434 435 433 color.r * (0.213 - c * 0.213 + s * 0.143) + color.g * (0.715 + c * 0.285 + s * 0.140) + color.b * (0.072 - c * 0.072 - s * 0.283), 434 color.r * (0.213 - c * 0.213 - s * 0.787) + color.g * (0.715 - c * 0.715 + s * 0.715) + color.b * (0.072 + c * 0.928 + s * 0.072), 435 color.a); 436 436 } 437 437 ); … … 593 593 { 594 594 Vector<RefPtr<LayerFilterRendererAction> > ret; 595 for (unsigned i nt i= 0; i < ops.size(); ++i) {595 for (unsigned i = 0; i < ops.size(); ++i) { 596 596 const FilterOperation& operation = *ops[i].get(); 597 597 if (operation.getOperationType() == FilterOperation::BLUR && static_cast<const BlurFilterOperation&>(operation).stdDeviation().value() < 0.1) … … 724 724 glBindFramebuffer(GL_FRAMEBUFFER, fbo); 725 725 726 for (unsigned i nt i= 0; i < actions.size(); ++i) {726 for (unsigned i = 0; i < actions.size(); ++i) { 727 727 // NOTE ABOUT PING-PONGING 728 728 // ======================= -
trunk/Source/WebCore/platform/graphics/blackberry/LayerRenderer.cpp
r148200 r149824 34 34 35 35 #if USE(ACCELERATED_COMPOSITING) 36 37 36 #include "LayerRenderer.h" 38 #include "LayerRendererClient.h"39 37 40 38 #include "LayerCompositingThread.h" 41 39 #include "LayerFilterRenderer.h" 40 #include "LayerRendererClient.h" 42 41 #include "TextureCacheCompositingThread.h" 43 42 … … 243 242 m_clipRect.intersect(targetRect); 244 243 m_clipRect = FloatRect(-1 + 2 * (m_clipRect.x() - targetRect.x()) / targetRect.width(), 245 246 247 244 -1 + 2 * (m_clipRect.y() - targetRect.y()) / targetRect.height(), 245 2 * m_clipRect.width() / targetRect.width(), 246 2 * m_clipRect.height() / targetRect.height()); 248 247 249 248 #if DEBUG_CLIPPING … … 382 381 383 382 FloatQuad vertices(transform.mapPoint(contents.minXMinYCorner()), 384 385 386 383 transform.mapPoint(contents.minXMaxYCorner()), 384 transform.mapPoint(contents.maxXMaxYCorner()), 385 transform.mapPoint(contents.maxXMinYCorner())); 387 386 388 387 if (!vertices.boundingBox().intersects(m_clipRect)) … … 392 391 glEnable(GL_BLEND); 393 392 glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); 394 } else {393 } else 395 394 glDisable(GL_BLEND); 396 }397 395 398 396 if (BlackBerry::Platform::Graphics::lockAndBindBufferGLTexture(buffer, GL_TEXTURE_2D)) { … … 411 409 { 412 410 FloatQuad vertices(transform.mapPoint(contents.minXMinYCorner()), 413 414 415 411 transform.mapPoint(contents.minXMaxYCorner()), 412 transform.mapPoint(contents.maxXMaxYCorner()), 413 transform.mapPoint(contents.maxXMinYCorner())); 416 414 417 415 if (!vertices.boundingBox().intersects(m_clipRect)) … … 995 993 continue; 996 994 997 995 compositeLayersRecursive(sublayer, newStencilValue, clipRect); 998 996 } 999 997 -
trunk/Source/WebCore/platform/graphics/blackberry/LayerWebKitThread.cpp
r148199 r149824 394 394 { 395 395 if (rect == m_frame) 396 return;396 return; 397 397 398 398 m_frame = rect; -
trunk/Source/WebCore/platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp
r149769 r149824 220 220 void MediaPlayerPrivate::play() 221 221 { 222 if (m_platformPlayer) {222 if (m_platformPlayer) 223 223 m_platformPlayer->play(); 224 }225 224 } 226 225 … … 714 713 onPauseNotified(); 715 714 else { 716 if (m_platformPlayer->isMetadataReady()) {715 if (m_platformPlayer->isMetadataReady()) 717 716 m_platformPlayer->playWithMetadataReady(); 718 }else717 else 719 718 m_waitMetadataTimer.startOneShot(checkMetadataReadyInterval); 720 719 } -
trunk/Source/WebCore/platform/image-decoders/blackberry/JPEGImageDecoder.cpp
r101336 r149824 163 163 164 164 JPEGImageDecoder::JPEGImageDecoder(ImageSource::AlphaOption alphaOption, 165 165 ImageSource::GammaAndColorProfileOption gammaAndColorProfileOption) 166 166 : ImageDecoder(alphaOption, gammaAndColorProfileOption) 167 167 {
Note: See TracChangeset
for help on using the changeset viewer.