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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/ImageBuffer.cpp

Issue 2610853005: Modify Copy{Sub}TextureCHROMIUM entry point to add level argument (Closed)
Patch Set: fix chromeos Created 3 years, 11 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2008, Google Inc. All rights reserved. 2 * Copyright (c) 2008, Google Inc. All rights reserved.
3 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> 3 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org>
4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. 4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are 7 * modification, are permitted provided that the following conditions are
8 * met: 8 * met:
9 * 9 *
10 * * Redistributions of source code must retain the above copyright 10 * * Redistributions of source code must retain the above copyright
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 gl->WaitSyncTokenCHROMIUM(produceSyncToken.GetConstData()); 262 gl->WaitSyncTokenCHROMIUM(produceSyncToken.GetConstData());
263 263
264 GLuint sourceTexture = 264 GLuint sourceTexture =
265 gl->CreateAndConsumeTextureCHROMIUM(textureInfo->fTarget, mailbox.name); 265 gl->CreateAndConsumeTextureCHROMIUM(textureInfo->fTarget, mailbox.name);
266 266
267 // The canvas is stored in a premultiplied format, so unpremultiply if 267 // The canvas is stored in a premultiplied format, so unpremultiply if
268 // necessary. The canvas is also stored in an inverted position, so the flip 268 // necessary. The canvas is also stored in an inverted position, so the flip
269 // semantics are reversed. 269 // semantics are reversed.
270 // It is expected that callers of this method have already allocated 270 // It is expected that callers of this method have already allocated
271 // the platform texture with the appropriate size. 271 // the platform texture with the appropriate size.
272 gl->CopySubTextureCHROMIUM(sourceTexture, texture, destPoint.x(), 272 gl->CopySubTextureCHROMIUM(sourceTexture, 0, texture, 0, destPoint.x(),
273 destPoint.y(), sourceSubRectangle.x(), 273 destPoint.y(), sourceSubRectangle.x(),
274 sourceSubRectangle.y(), sourceSubRectangle.width(), 274 sourceSubRectangle.y(), sourceSubRectangle.width(),
275 sourceSubRectangle.height(), 275 sourceSubRectangle.height(),
276 flipY ? GL_FALSE : GL_TRUE, GL_FALSE, 276 flipY ? GL_FALSE : GL_TRUE, GL_FALSE,
277 premultiplyAlpha ? GL_FALSE : GL_TRUE); 277 premultiplyAlpha ? GL_FALSE : GL_TRUE);
278 278
279 gl->DeleteTextures(1, &sourceTexture); 279 gl->DeleteTextures(1, &sourceTexture);
280 280
281 const GLuint64 contextFenceSync = gl->InsertFenceSyncCHROMIUM(); 281 const GLuint64 contextFenceSync = gl->InsertFenceSyncCHROMIUM();
282 282
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
567 ASSERT(MIMETypeRegistry::isSupportedImageMIMETypeForEncoding(mimeType)); 567 ASSERT(MIMETypeRegistry::isSupportedImageMIMETypeForEncoding(mimeType));
568 568
569 Vector<unsigned char> result; 569 Vector<unsigned char> result;
570 if (!encodeImage(mimeType, quality, &result)) 570 if (!encodeImage(mimeType, quality, &result))
571 return "data:,"; 571 return "data:,";
572 572
573 return "data:" + mimeType + ";base64," + base64Encode(result); 573 return "data:" + mimeType + ";base64," + base64Encode(result);
574 } 574 }
575 575
576 } // namespace blink 576 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698