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

Side by Side Diff: chrome/renderer/pepper/pepper_flash_renderer_host.cc

Issue 1007993006: Fix for the flash Text layout framework problems with win32k lockdown mode on Windows 8+ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Replace calls to GetPlatformCanvas with GetCanvas Created 5 years, 9 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
« no previous file with comments | « no previous file | no next file » | 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 "chrome/renderer/pepper/pepper_flash_renderer_host.h" 5 #include "chrome/renderer/pepper/pepper_flash_renderer_host.h"
6 6
7 #include <map> 7 #include <map>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 if (!typeface) 214 if (!typeface)
215 return PP_ERROR_FAILED; 215 return PP_ERROR_FAILED;
216 216
217 EnterResourceNoLock<PPB_ImageData_API> enter( 217 EnterResourceNoLock<PPB_ImageData_API> enter(
218 params.image_data.host_resource(), true); 218 params.image_data.host_resource(), true);
219 if (enter.failed()) 219 if (enter.failed())
220 return PP_ERROR_FAILED; 220 return PP_ERROR_FAILED;
221 221
222 // Set up the canvas. 222 // Set up the canvas.
223 PPB_ImageData_API* image = static_cast<PPB_ImageData_API*>(enter.object()); 223 PPB_ImageData_API* image = static_cast<PPB_ImageData_API*>(enter.object());
224 SkCanvas* canvas = image->GetPlatformCanvas(); 224 SkCanvas* canvas = image->GetCanvas();
225 bool needs_unmapping = false; 225 bool needs_unmapping = false;
226 if (!canvas) { 226 if (!canvas) {
227 needs_unmapping = true; 227 needs_unmapping = true;
228 image->Map(); 228 image->Map();
229 canvas = image->GetPlatformCanvas(); 229 canvas = image->GetCanvas();
230 if (!canvas) 230 if (!canvas)
231 return PP_ERROR_FAILED; // Failure mapping. 231 return PP_ERROR_FAILED; // Failure mapping.
232 } 232 }
233 233
234 SkAutoCanvasRestore acr(canvas, true); 234 SkAutoCanvasRestore acr(canvas, true);
235 235
236 // Clip is applied in pixels before the transform. 236 // Clip is applied in pixels before the transform.
237 SkRect clip_rect = { 237 SkRect clip_rect = {
238 SkIntToScalar(params.clip.point.x), SkIntToScalar(params.clip.point.y), 238 SkIntToScalar(params.clip.point.x), SkIntToScalar(params.clip.point.y),
239 SkIntToScalar(params.clip.point.x + params.clip.size.width), 239 SkIntToScalar(params.clip.point.x + params.clip.size.width),
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 rect.point.x, rect.point.y, rect.size.width, rect.size.height))) 373 rect.point.x, rect.point.y, rect.size.width, rect.size.height)))
374 return PP_OK; 374 return PP_OK;
375 return PP_ERROR_FAILED; 375 return PP_ERROR_FAILED;
376 } 376 }
377 377
378 int32_t PepperFlashRendererHost::OnInvokePrinting( 378 int32_t PepperFlashRendererHost::OnInvokePrinting(
379 ppapi::host::HostMessageContext* host_context) { 379 ppapi::host::HostMessageContext* host_context) {
380 pdf::PPB_PDF_Impl::InvokePrintingForInstance(pp_instance()); 380 pdf::PPB_PDF_Impl::InvokePrintingForInstance(pp_instance());
381 return PP_OK; 381 return PP_OK;
382 } 382 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698