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

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

Issue 1746283002: Rename enums/functions that collide in chromium style in platform/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: get-names-13-platform: . Created 4 years, 9 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 ASSERT(m_frameGenerator); 95 ASSERT(m_frameGenerator);
96 frameData->m_hasAlpha = m_frameGenerator->hasAlpha(index); 96 frameData->m_hasAlpha = m_frameGenerator->hasAlpha(index);
97 frameData->m_frameBytes = m_size.area() * sizeof(ImageFrame::PixelData); 97 frameData->m_frameBytes = m_size.area() * sizeof(ImageFrame::PixelData);
98 return createFrameImageAtIndex(index, !frameData->m_hasAlpha); 98 return createFrameImageAtIndex(index, !frameData->m_hasAlpha);
99 } 99 }
100 100
101 if (!m_actualDecoder || m_actualDecoder->failed()) 101 if (!m_actualDecoder || m_actualDecoder->failed())
102 return nullptr; 102 return nullptr;
103 103
104 ImageFrame* frame = m_actualDecoder->frameBufferAtIndex(index); 104 ImageFrame* frame = m_actualDecoder->frameBufferAtIndex(index);
105 if (!frame || frame->status() == ImageFrame::FrameEmpty) 105 if (!frame || frame->getStatus() == ImageFrame::FrameEmpty)
106 return nullptr; 106 return nullptr;
107 107
108 return adoptRef(SkImage::NewFromBitmap(frame->bitmap())); 108 return adoptRef(SkImage::NewFromBitmap(frame->bitmap()));
109 } 109 }
110 110
111 void DeferredImageDecoder::setData(SharedBuffer& data, bool allDataReceived) 111 void DeferredImageDecoder::setData(SharedBuffer& data, bool allDataReceived)
112 { 112 {
113 if (m_actualDecoder) { 113 if (m_actualDecoder) {
114 m_data = RefPtr<SharedBuffer>(data); 114 m_data = RefPtr<SharedBuffer>(data);
115 m_lastDataSize = data.size(); 115 m_lastDataSize = data.size();
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 return image.release(); 290 return image.release();
291 } 291 }
292 292
293 bool DeferredImageDecoder::hotSpot(IntPoint& hotSpot) const 293 bool DeferredImageDecoder::hotSpot(IntPoint& hotSpot) const
294 { 294 {
295 // TODO: Implement. 295 // TODO: Implement.
296 return m_actualDecoder ? m_actualDecoder->hotSpot(hotSpot) : false; 296 return m_actualDecoder ? m_actualDecoder->hotSpot(hotSpot) : false;
297 } 297 }
298 298
299 } // namespace blink 299 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698