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

Unified Diff: chrome/browser/image_decoder.h

Issue 11968044: Fix login visual hitch on chromebook (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/image_decoder.h
diff --git a/chrome/browser/image_decoder.h b/chrome/browser/image_decoder.h
index 24f4d89bad6070486eb3b985f6a22b52143744f3..7c006b0dc640f7306ea5b9e63ad050ce27a3ec37 100644
--- a/chrome/browser/image_decoder.h
+++ b/chrome/browser/image_decoder.h
@@ -42,9 +42,13 @@ class ImageDecoder : public content::UtilityProcessHostClient {
const std::string& image_data,
ImageCodec image_codec);
- // Starts image decoding.
+ // Starts image decoding on well-known threads.
void Start();
+ // Starts image decoding on a sequence worker thread with a sequence token
+ // associated with |sequence_token_name|.
+ void Start(std::string sequence_token_name);
+
const std::vector<unsigned char>& get_image_data() const {
return image_data_;
}
@@ -58,6 +62,10 @@ class ImageDecoder : public content::UtilityProcessHostClient {
// Overidden from UtilityProcessHostClient:
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
+ // True if on valid thread or named worker thread associated with
+ // |sequence_token_name_|.
+ bool CalledOnValidThreadOrWorkerThread();
+
// IPC message handlers.
void OnDecodeImageSucceeded(const SkBitmap& decoded_image);
void OnDecodeImageFailed();
@@ -69,6 +77,7 @@ class ImageDecoder : public content::UtilityProcessHostClient {
std::vector<unsigned char> image_data_;
const ImageCodec image_codec_;
content::BrowserThread::ID target_thread_id_;
+ std::string sequence_token_name_;
DISALLOW_COPY_AND_ASSIGN(ImageDecoder);
};

Powered by Google App Engine
This is Rietveld 408576698