| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008, 2009, 2010 Apple 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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 layoutObject()->updateFromElement(); | 184 layoutObject()->updateFromElement(); |
| 185 } | 185 } |
| 186 | 186 |
| 187 void HTMLVideoElement::updateDisplayState() { | 187 void HTMLVideoElement::updateDisplayState() { |
| 188 if (posterImageURL().isEmpty()) | 188 if (posterImageURL().isEmpty()) |
| 189 setDisplayMode(Video); | 189 setDisplayMode(Video); |
| 190 else if (getDisplayMode() < Poster) | 190 else if (getDisplayMode() < Poster) |
| 191 setDisplayMode(Poster); | 191 setDisplayMode(Poster); |
| 192 } | 192 } |
| 193 | 193 |
| 194 void HTMLVideoElement::paintCurrentFrame(SkCanvas* canvas, | 194 void HTMLVideoElement::paintCurrentFrame(PaintCanvas* canvas, |
| 195 const IntRect& destRect, | 195 const IntRect& destRect, |
| 196 const SkPaint* paint) const { | 196 const PaintFlags* paint) const { |
| 197 if (!webMediaPlayer()) | 197 if (!webMediaPlayer()) |
| 198 return; | 198 return; |
| 199 | 199 |
| 200 SkPaint mediaPaint; | 200 PaintFlags mediaPaint; |
| 201 if (paint) { | 201 if (paint) { |
| 202 mediaPaint = *paint; | 202 mediaPaint = *paint; |
| 203 } else { | 203 } else { |
| 204 mediaPaint.setAlpha(0xFF); | 204 mediaPaint.setAlpha(0xFF); |
| 205 mediaPaint.setFilterQuality(kLow_SkFilterQuality); | 205 mediaPaint.setFilterQuality(kLow_SkFilterQuality); |
| 206 } | 206 } |
| 207 | 207 |
| 208 webMediaPlayer()->paint(canvas, destRect, mediaPaint); | 208 webMediaPlayer()->paint(canvas, destRect, mediaPaint); |
| 209 } | 209 } |
| 210 | 210 |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 372 return ScriptPromise(); | 372 return ScriptPromise(); |
| 373 if (!ImageBitmap::isResizeOptionValid(options, exceptionState)) | 373 if (!ImageBitmap::isResizeOptionValid(options, exceptionState)) |
| 374 return ScriptPromise(); | 374 return ScriptPromise(); |
| 375 return ImageBitmapSource::fulfillImageBitmap( | 375 return ImageBitmapSource::fulfillImageBitmap( |
| 376 scriptState, | 376 scriptState, |
| 377 ImageBitmap::create(this, cropRect, | 377 ImageBitmap::create(this, cropRect, |
| 378 eventTarget.toLocalDOMWindow()->document(), options)); | 378 eventTarget.toLocalDOMWindow()->document(), options)); |
| 379 } | 379 } |
| 380 | 380 |
| 381 } // namespace blink | 381 } // namespace blink |
| OLD | NEW |