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

Side by Side Diff: Source/core/html/HTMLCanvasElement.cpp

Issue 1303153005: Introduce WebTaskRunner Patch 3/5 (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add missing #include Created 5 years, 3 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 | « Source/core/fetch/MemoryCacheTest.cpp ('k') | Source/core/html/parser/BackgroundHTMLParser.cpp » ('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) 2004, 2006, 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved.
3 * Copyright (C) 2007 Alp Toker <alp@atoker.com> 3 * Copyright (C) 2007 Alp Toker <alp@atoker.com>
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 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after
567 String encodingMimeType = toEncodingMimeType(mimeType); 567 String encodingMimeType = toEncodingMimeType(mimeType);
568 568
569 ImageData* imageData = toImageData(BackBuffer); 569 ImageData* imageData = toImageData(BackBuffer);
570 ScopedDisposal<ImageData> disposer(imageData); 570 ScopedDisposal<ImageData> disposer(imageData);
571 571
572 // Perform image encoding 572 // Perform image encoding
573 Vector<char> encodedImage; 573 Vector<char> encodedImage;
574 ImageDataBuffer(imageData->size(), imageData->data()->data()).encodeImage(en codingMimeType, qualityPtr, &encodedImage); 574 ImageDataBuffer(imageData->size(), imageData->data()->data()).encodeImage(en codingMimeType, qualityPtr, &encodedImage);
575 resultBlob = File::create(encodedImage.data(), encodedImage.size(), encoding MimeType); 575 resultBlob = File::create(encodedImage.data(), encodedImage.size(), encoding MimeType);
576 576
577 Platform::current()->mainThread()->postTask(FROM_HERE, bind(&FileCallback::h andleEvent, callback, resultBlob)); 577 Platform::current()->mainThread()->taskRunner()->postTask(FROM_HERE, bind(&F ileCallback::handleEvent, callback, resultBlob));
578 } 578 }
579 579
580 SecurityOrigin* HTMLCanvasElement::securityOrigin() const 580 SecurityOrigin* HTMLCanvasElement::securityOrigin() const
581 { 581 {
582 return document().securityOrigin(); 582 return document().securityOrigin();
583 } 583 }
584 584
585 bool HTMLCanvasElement::originClean() const 585 bool HTMLCanvasElement::originClean() const
586 { 586 {
587 if (document().settings() && document().settings()->disableReadingFromCanvas ()) 587 if (document().settings() && document().settings()->disableReadingFromCanvas ())
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
943 { 943 {
944 return FloatSize(width(), height()); 944 return FloatSize(width(), height());
945 } 945 }
946 946
947 bool HTMLCanvasElement::isOpaque() const 947 bool HTMLCanvasElement::isOpaque() const
948 { 948 {
949 return m_context && !m_context->hasAlpha(); 949 return m_context && !m_context->hasAlpha();
950 } 950 }
951 951
952 } // blink 952 } // blink
OLDNEW
« no previous file with comments | « Source/core/fetch/MemoryCacheTest.cpp ('k') | Source/core/html/parser/BackgroundHTMLParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698