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

Side by Side Diff: webkit/port/platform/graphics/SkiaUtils.cpp

Issue 1612: Implement "iframe shim" behavior for windowed plugins.... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 12 years, 2 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
OLDNEW
1 // Copyright (c) 2008, Google Inc. 1 // Copyright (c) 2008, Google Inc.
2 // All rights reserved. 2 // 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 are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // * Redistributions of source code must retain the above copyright 8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer. 9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above 10 // * Redistributions in binary form must reproduce the above
(...skipping 19 matching lines...) Expand all
30 #include "config.h" 30 #include "config.h"
31 31
32 #include "SkiaUtils.h" 32 #include "SkiaUtils.h"
33 33
34 #include "SharedBuffer.h" 34 #include "SharedBuffer.h"
35 #include "SkCanvas.h" 35 #include "SkCanvas.h"
36 #include "SkColorPriv.h" 36 #include "SkColorPriv.h"
37 #include "SkMatrix.h" 37 #include "SkMatrix.h"
38 #include "SkRegion.h" 38 #include "SkRegion.h"
39 39
40 #include "base/gfx/bitmap_header.h" 40 #include "base/gfx/gdi_util.h"
41 41
42 void WebCorePointToSkiaPoint(const WebCore::FloatPoint& src, SkPoint* dst) 42 void WebCorePointToSkiaPoint(const WebCore::FloatPoint& src, SkPoint* dst)
43 { 43 {
44 dst->set(WebCoreFloatToSkScalar(src.x()), WebCoreFloatToSkScalar(src.y())); 44 dst->set(WebCoreFloatToSkScalar(src.x()), WebCoreFloatToSkScalar(src.y()));
45 } 45 }
46 46
47 void WebCoreRectToSkiaRect(const WebCore::IntRect& src, SkRect* dst) 47 void WebCoreRectToSkiaRect(const WebCore::IntRect& src, SkRect* dst)
48 { 48 {
49 dst->set(SkIntToScalar(src.x()), 49 dst->set(SkIntToScalar(src.x()),
50 SkIntToScalar(src.y()), 50 SkIntToScalar(src.y()),
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 buffer->append(reinterpret_cast<const char*>(&v4Header), 253 buffer->append(reinterpret_cast<const char*>(&v4Header),
254 sizeof(BITMAPV4HEADER)); 254 sizeof(BITMAPV4HEADER));
255 255
256 // Write the image body. 256 // Write the image body.
257 SkAutoLockPixels bitmap_lock(bitmap); 257 SkAutoLockPixels bitmap_lock(bitmap);
258 buffer->append(reinterpret_cast<const char*>(bitmap.getAddr32(0, 0)), 258 buffer->append(reinterpret_cast<const char*>(bitmap.getAddr32(0, 0)),
259 v4Header.bV4SizeImage); 259 v4Header.bV4SizeImage);
260 260
261 return buffer; 261 return buffer;
262 } 262 }
OLDNEW
« no previous file with comments | « webkit/port/platform/graphics/ImageSkia.cpp ('k') | webkit/tools/test_shell/test_webview_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698