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

Side by Side Diff: third_party/WebKit/Source/platform/exported/WebImage.cpp

Issue 2615813003: Migrate WTF::Vector::append() to ::push_back() [part 14 of N] (Closed)
Patch Set: rebase, small fix in FontSettings.h 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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 if (frameSize == lastSize) 99 if (frameSize == lastSize)
100 continue; 100 continue;
101 lastSize = frameSize; 101 lastSize = frameSize;
102 102
103 ImageFrame* frame = decoder->frameBufferAtIndex(i); 103 ImageFrame* frame = decoder->frameBufferAtIndex(i);
104 if (!frame) 104 if (!frame)
105 continue; 105 continue;
106 106
107 SkBitmap bitmap = frame->bitmap(); 107 SkBitmap bitmap = frame->bitmap();
108 if (!bitmap.isNull() && frame->getStatus() == ImageFrame::FrameComplete) 108 if (!bitmap.isNull() && frame->getStatus() == ImageFrame::FrameComplete)
109 frames.append(WebImage(bitmap)); 109 frames.push_back(WebImage(bitmap));
110 } 110 }
111 111
112 return frames; 112 return frames;
113 } 113 }
114 114
115 void WebImage::reset() { 115 void WebImage::reset() {
116 m_bitmap.reset(); 116 m_bitmap.reset();
117 } 117 }
118 118
119 void WebImage::assign(const WebImage& image) { 119 void WebImage::assign(const WebImage& image) {
(...skipping 13 matching lines...) Expand all
133 return; 133 return;
134 134
135 // TODO(ccameron): WebImage needs to be consistent about color spaces. 135 // TODO(ccameron): WebImage needs to be consistent about color spaces.
136 // https://crbug.com/672315 136 // https://crbug.com/672315
137 if (sk_sp<SkImage> skImage = 137 if (sk_sp<SkImage> skImage =
138 image->imageForCurrentFrame(ColorBehavior::transformToGlobalTarget())) 138 image->imageForCurrentFrame(ColorBehavior::transformToGlobalTarget()))
139 skImage->asLegacyBitmap(&m_bitmap, SkImage::kRO_LegacyBitmapMode); 139 skImage->asLegacyBitmap(&m_bitmap, SkImage::kRO_LegacyBitmapMode);
140 } 140 }
141 141
142 } // namespace blink 142 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/blob/BlobData.cpp ('k') | third_party/WebKit/Source/platform/exported/WebMediaStream.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698