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

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

Issue 1217893004: remove unused cachedBitmap from ImageBufferSurface (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 5 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/platform/graphics/ImageBufferSurface.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) 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 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 if (!context3D || !textureImage) 234 if (!context3D || !textureImage)
235 return false; 235 return false;
236 ASSERT(textureImage->isTextureBacked()); 236 ASSERT(textureImage->isTextureBacked());
237 // Get the texture ID, flushing pending operations if needed. 237 // Get the texture ID, flushing pending operations if needed.
238 Platform3DObject textureId = textureImage->getTextureHandle(true); 238 Platform3DObject textureId = textureImage->getTextureHandle(true);
239 if (!textureId) 239 if (!textureId)
240 return false; 240 return false;
241 241
242 context3D->flush(); 242 context3D->flush();
243 243
244 m_surface->invalidateCachedBitmap();
245 bool result = drawingBuffer->copyToPlatformTexture(context3D, textureId, GL_ RGBA, 244 bool result = drawingBuffer->copyToPlatformTexture(context3D, textureId, GL_ RGBA,
246 GL_UNSIGNED_BYTE, 0, true, false, sourceBuffer); 245 GL_UNSIGNED_BYTE, 0, true, false, sourceBuffer);
247 246
248 if (result) { 247 if (result) {
249 m_surface->didModifyBackingTexture(); 248 m_surface->didModifyBackingTexture();
250 } 249 }
251 250
252 return result; 251 return result;
253 } 252 }
254 253
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 ASSERT(MIMETypeRegistry::isSupportedImageMIMETypeForEncoding(mimeType)); 376 ASSERT(MIMETypeRegistry::isSupportedImageMIMETypeForEncoding(mimeType));
378 377
379 Vector<char> encodedImage; 378 Vector<char> encodedImage;
380 if (!encodeImage(*this, mimeType, quality, &encodedImage)) 379 if (!encodeImage(*this, mimeType, quality, &encodedImage))
381 return "data:,"; 380 return "data:,";
382 381
383 return "data:" + mimeType + ";base64," + base64Encode(encodedImage); 382 return "data:" + mimeType + ";base64," + base64Encode(encodedImage);
384 } 383 }
385 384
386 } // namespace blink 385 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/platform/graphics/ImageBufferSurface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698