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

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

Issue 10451068: Fixing gcc 4.7 building problems. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Modified per Adam's comments Created 8 years, 6 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 // 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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 static_cast<SkTypeface::Style>(style)); 117 static_cast<SkTypeface::Style>(style));
118 if (!typeface) 118 if (!typeface)
119 return PP_FALSE; 119 return PP_FALSE;
120 SkAutoUnref aur(typeface); 120 SkAutoUnref aur(typeface);
121 121
122 // Set up the canvas. 122 // Set up the canvas.
123 SkCanvas* canvas = image_resource->GetPlatformCanvas(); 123 SkCanvas* canvas = image_resource->GetPlatformCanvas();
124 SkAutoCanvasRestore acr(canvas, true); 124 SkAutoCanvasRestore acr(canvas, true);
125 125
126 // Clip is applied in pixels before the transform. 126 // Clip is applied in pixels before the transform.
127 SkRect clip_rect = { clip->point.x, clip->point.y, 127 SkRect clip_rect = { SkIntToScalar(clip->point.x),
128 clip->point.x + clip->size.width, 128 SkIntToScalar(clip->point.y),
129 clip->point.y + clip->size.height }; 129 SkIntToScalar(clip->point.x + clip->size.width),
130 SkIntToScalar(clip->point.y + clip->size.height) };
130 canvas->clipRect(clip_rect); 131 canvas->clipRect(clip_rect);
131 132
132 // Convert & set the matrix. 133 // Convert & set the matrix.
133 SkMatrix matrix; 134 SkMatrix matrix;
134 matrix.set(SkMatrix::kMScaleX, SkFloatToScalar(transformation[0][0])); 135 matrix.set(SkMatrix::kMScaleX, SkFloatToScalar(transformation[0][0]));
135 matrix.set(SkMatrix::kMSkewX, SkFloatToScalar(transformation[0][1])); 136 matrix.set(SkMatrix::kMSkewX, SkFloatToScalar(transformation[0][1]));
136 matrix.set(SkMatrix::kMTransX, SkFloatToScalar(transformation[0][2])); 137 matrix.set(SkMatrix::kMTransX, SkFloatToScalar(transformation[0][2]));
137 matrix.set(SkMatrix::kMSkewY, SkFloatToScalar(transformation[1][0])); 138 matrix.set(SkMatrix::kMSkewY, SkFloatToScalar(transformation[1][0]));
138 matrix.set(SkMatrix::kMScaleY, SkFloatToScalar(transformation[1][1])); 139 matrix.set(SkMatrix::kMScaleY, SkFloatToScalar(transformation[1][1]));
139 matrix.set(SkMatrix::kMTransY, SkFloatToScalar(transformation[1][2])); 140 matrix.set(SkMatrix::kMTransY, SkFloatToScalar(transformation[1][2]));
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
641 } 642 }
642 case PP_FLASH_CLIPBOARD_FORMAT_INVALID: 643 case PP_FLASH_CLIPBOARD_FORMAT_INVALID:
643 break; 644 break;
644 } 645 }
645 646
646 return PP_ERROR_BADARGUMENT; 647 return PP_ERROR_BADARGUMENT;
647 } 648 }
648 649
649 } // namespace ppapi 650 } // namespace ppapi
650 } // namespace webkit 651 } // namespace webkit
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698