| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "webkit/plugins/ppapi/ppb_flash_impl.h" | 5 #include "webkit/plugins/ppapi/ppb_flash_impl.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 if (font_desc->italic) | 82 if (font_desc->italic) |
| 83 style |= SkTypeface::kItalic; | 83 style |= SkTypeface::kItalic; |
| 84 SkTypeface* typeface = | 84 SkTypeface* typeface = |
| 85 SkTypeface::CreateFromName(face_name->value().c_str(), | 85 SkTypeface::CreateFromName(face_name->value().c_str(), |
| 86 static_cast<SkTypeface::Style>(style)); | 86 static_cast<SkTypeface::Style>(style)); |
| 87 if (!typeface) | 87 if (!typeface) |
| 88 return PP_FALSE; | 88 return PP_FALSE; |
| 89 SkAutoUnref aur(typeface); | 89 SkAutoUnref aur(typeface); |
| 90 | 90 |
| 91 // Set up the canvas. | 91 // Set up the canvas. |
| 92 SkCanvas* canvas = image_resource->mapped_canvas(); | 92 SkCanvas* canvas = image_resource->GetPlatformCanvas(); |
| 93 SkAutoCanvasRestore acr(canvas, true); | 93 SkAutoCanvasRestore acr(canvas, true); |
| 94 | 94 |
| 95 // Clip is applied in pixels before the transform. | 95 // Clip is applied in pixels before the transform. |
| 96 SkRect clip_rect = { clip->point.x, clip->point.y, | 96 SkRect clip_rect = { clip->point.x, clip->point.y, |
| 97 clip->point.x + clip->size.width, | 97 clip->point.x + clip->size.width, |
| 98 clip->point.y + clip->size.height }; | 98 clip->point.y + clip->size.height }; |
| 99 canvas->clipRect(clip_rect); | 99 canvas->clipRect(clip_rect); |
| 100 | 100 |
| 101 // Convert & set the matrix. | 101 // Convert & set the matrix. |
| 102 SkMatrix matrix; | 102 SkMatrix matrix; |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 return &ppb_flash_11; | 274 return &ppb_flash_11; |
| 275 } | 275 } |
| 276 | 276 |
| 277 // static | 277 // static |
| 278 const PPB_Flash_12_0* PPB_Flash_Impl::GetInterface12_0() { | 278 const PPB_Flash_12_0* PPB_Flash_Impl::GetInterface12_0() { |
| 279 return &ppb_flash_12; | 279 return &ppb_flash_12; |
| 280 } | 280 } |
| 281 | 281 |
| 282 } // namespace ppapi | 282 } // namespace ppapi |
| 283 } // namespace webkit | 283 } // namespace webkit |
| OLD | NEW |