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

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

Issue 2523673004: [NOT FOR COMMIT] Fully replace SkCanvas uses.
Patch Set: Support Android build. 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 4487 matching lines...) Expand 10 before | Expand all | Expand 10 after
4498 if (!buf) { 4498 if (!buf) {
4499 synthesizeGLError(GL_OUT_OF_MEMORY, functionName, "out of memory"); 4499 synthesizeGLError(GL_OUT_OF_MEMORY, functionName, "out of memory");
4500 return nullptr; 4500 return nullptr;
4501 } 4501 }
4502 4502
4503 if (!image->currentFrameKnownToBeOpaque()) 4503 if (!image->currentFrameKnownToBeOpaque())
4504 buf->canvas()->clear(SK_ColorTRANSPARENT); 4504 buf->canvas()->clear(SK_ColorTRANSPARENT);
4505 4505
4506 IntRect srcRect(IntPoint(), image->size()); 4506 IntRect srcRect(IntPoint(), image->size());
4507 IntRect destRect(0, 0, size.width(), size.height()); 4507 IntRect destRect(0, 0, size.width(), size.height());
4508 SkPaint paint; 4508 CdlPaint paint;
4509 image->draw(buf->canvas(), paint, destRect, srcRect, 4509 image->draw(buf->canvas(), paint, destRect, srcRect,
4510 DoNotRespectImageOrientation, Image::DoNotClampImageToSourceRect); 4510 DoNotRespectImageOrientation, Image::DoNotClampImageToSourceRect);
4511 return buf->newImageSnapshot(PreferNoAcceleration, 4511 return buf->newImageSnapshot(PreferNoAcceleration,
4512 SnapshotReasonWebGLDrawImageIntoBuffer); 4512 SnapshotReasonWebGLDrawImageIntoBuffer);
4513 } 4513 }
4514 4514
4515 WebGLTexture* WebGLRenderingContextBase::validateTexImageBinding( 4515 WebGLTexture* WebGLRenderingContextBase::validateTexImageBinding(
4516 const char* funcName, 4516 const char* funcName,
4517 TexImageFunctionID functionID, 4517 TexImageFunctionID functionID,
4518 GLenum target) { 4518 GLenum target) {
(...skipping 3195 matching lines...) Expand 10 before | Expand all | Expand 10 after
7714 7714
7715 void WebGLRenderingContextBase::getHTMLOrOffscreenCanvas( 7715 void WebGLRenderingContextBase::getHTMLOrOffscreenCanvas(
7716 HTMLCanvasElementOrOffscreenCanvas& result) const { 7716 HTMLCanvasElementOrOffscreenCanvas& result) const {
7717 if (canvas()) 7717 if (canvas())
7718 result.setHTMLCanvasElement(canvas()); 7718 result.setHTMLCanvasElement(canvas());
7719 else 7719 else
7720 result.setOffscreenCanvas(getOffscreenCanvas()); 7720 result.setOffscreenCanvas(getOffscreenCanvas());
7721 } 7721 }
7722 7722
7723 } // namespace blink 7723 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698