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

Side by Side Diff: webkit/plugins/ppapi/ppb_flash_impl.cc

Issue 9192038: Relanding this with fixes to the mac dbg builder (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 8 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 | Annotate | Revision Log
« no previous file with comments | « webkit/plugins/ppapi/plugin_module.cc ('k') | webkit/plugins/ppapi/ppb_font_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « webkit/plugins/ppapi/plugin_module.cc ('k') | webkit/plugins/ppapi/ppb_font_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698