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

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

Issue 1331533002: [poc] curve-filter Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix CanvasRenderingContext2D::createPattern crash for #40 Created 4 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) 2006 Apple Computer, Inc. All rights reserved. 2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
3 * Copyright (C) 2007 Alp Toker <alp.toker@collabora.co.uk> 3 * Copyright (C) 2007 Alp Toker <alp.toker@collabora.co.uk>
4 * Copyright (C) 2008, Google Inc. All rights reserved. 4 * Copyright (C) 2008, Google Inc. 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 bool ImageSource::isSizeAvailable() 65 bool ImageSource::isSizeAvailable()
66 { 66 {
67 return m_decoder && m_decoder->isSizeAvailable(); 67 return m_decoder && m_decoder->isSizeAvailable();
68 } 68 }
69 69
70 bool ImageSource::hasColorProfile() const 70 bool ImageSource::hasColorProfile() const
71 { 71 {
72 return m_decoder && m_decoder->hasColorProfile(); 72 return m_decoder && m_decoder->hasColorProfile();
73 } 73 }
74 74
75 PassRefPtr<ColorSpaceProfile> ImageSource::colorProfile() const
76 {
77 return m_decoder ? m_decoder->colorProfile() : nullptr;
78 }
79
75 IntSize ImageSource::size(RespectImageOrientationEnum shouldRespectOrientation) const 80 IntSize ImageSource::size(RespectImageOrientationEnum shouldRespectOrientation) const
76 { 81 {
77 return frameSizeAtIndex(0, shouldRespectOrientation); 82 return frameSizeAtIndex(0, shouldRespectOrientation);
78 } 83 }
79 84
80 IntSize ImageSource::frameSizeAtIndex(size_t index, RespectImageOrientationEnum shouldRespectOrientation) const 85 IntSize ImageSource::frameSizeAtIndex(size_t index, RespectImageOrientationEnum shouldRespectOrientation) const
81 { 86 {
82 if (!m_decoder) 87 if (!m_decoder)
83 return IntSize(); 88 return IntSize();
84 89
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 { 146 {
142 return m_decoder && m_decoder->frameIsCompleteAtIndex(index); 147 return m_decoder && m_decoder->frameIsCompleteAtIndex(index);
143 } 148 }
144 149
145 size_t ImageSource::frameBytesAtIndex(size_t index) const 150 size_t ImageSource::frameBytesAtIndex(size_t index) const
146 { 151 {
147 return m_decoder ? m_decoder->frameBytesAtIndex(index) : 0; 152 return m_decoder ? m_decoder->frameBytesAtIndex(index) : 0;
148 } 153 }
149 154
150 } // namespace blink 155 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698