| OLD | NEW |
| 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 4485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4496 return; | 4496 return; |
| 4497 TexImageFunctionType functionType; | 4497 TexImageFunctionType functionType; |
| 4498 if (functionID == TexImage2D) | 4498 if (functionID == TexImage2D) |
| 4499 functionType = TexImage; | 4499 functionType = TexImage; |
| 4500 else | 4500 else |
| 4501 functionType = TexSubImage; | 4501 functionType = TexSubImage; |
| 4502 if (!validateTexFunc(funcName, functionType, SourceImageBitmap, target, leve
l, internalformat, bitmap->width(), bitmap->height(), 1, 0, format, type, xoffse
t, yoffset, zoffset)) | 4502 if (!validateTexFunc(funcName, functionType, SourceImageBitmap, target, leve
l, internalformat, bitmap->width(), bitmap->height(), 1, 0, format, type, xoffse
t, yoffset, zoffset)) |
| 4503 return; | 4503 return; |
| 4504 ASSERT(bitmap->bitmapImage()); | 4504 ASSERT(bitmap->bitmapImage()); |
| 4505 | 4505 |
| 4506 if (functionID != TexSubImage3D && bitmap->isTextureBacked() && canUseTexIma
geByGPU(functionID, internalformat, type)) { | 4506 if (functionID != TexSubImage3D && bitmap->isAccelerated() && canUseTexImage
ByGPU(functionID, internalformat, type)) { |
| 4507 if (functionID == TexImage2D) { | 4507 if (functionID == TexImage2D) { |
| 4508 texImage2DBase(target, level, internalformat, bitmap->width(), bitma
p->height(), 0, format, type, 0); | 4508 texImage2DBase(target, level, internalformat, bitmap->width(), bitma
p->height(), 0, format, type, 0); |
| 4509 texImageByGPU(TexImage2DByGPU, texture, target, level, internalforma
t, type, 0, 0, 0, bitmap); | 4509 texImageByGPU(TexImage2DByGPU, texture, target, level, internalforma
t, type, 0, 0, 0, bitmap); |
| 4510 } else if (functionID == TexSubImage2D) { | 4510 } else if (functionID == TexSubImage2D) { |
| 4511 texImageByGPU(TexSubImage2DByGPU, texture, target, level, GL_RGBA, t
ype, xoffset, yoffset, 0, bitmap); | 4511 texImageByGPU(TexSubImage2DByGPU, texture, target, level, GL_RGBA, t
ype, xoffset, yoffset, 0, bitmap); |
| 4512 } | 4512 } |
| 4513 return; | 4513 return; |
| 4514 } | 4514 } |
| 4515 sk_sp<SkImage> skImage = bitmap->bitmapImage()->imageForCurrentFrame(); | 4515 sk_sp<SkImage> skImage = bitmap->bitmapImage()->imageForCurrentFrame(); |
| 4516 SkPixmap pixmap; | 4516 SkPixmap pixmap; |
| (...skipping 1956 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6473 | 6473 |
| 6474 void WebGLRenderingContextBase::getHTMLOrOffscreenCanvas(HTMLCanvasElementOrOffs
creenCanvas& result) const | 6474 void WebGLRenderingContextBase::getHTMLOrOffscreenCanvas(HTMLCanvasElementOrOffs
creenCanvas& result) const |
| 6475 { | 6475 { |
| 6476 if (canvas()) | 6476 if (canvas()) |
| 6477 result.setHTMLCanvasElement(canvas()); | 6477 result.setHTMLCanvasElement(canvas()); |
| 6478 else | 6478 else |
| 6479 result.setOffscreenCanvas(getOffscreenCanvas()); | 6479 result.setOffscreenCanvas(getOffscreenCanvas()); |
| 6480 } | 6480 } |
| 6481 | 6481 |
| 6482 } // namespace blink | 6482 } // namespace blink |
| OLD | NEW |