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

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

Issue 11588: Remove base versions of the graphics headers, which previously just forwarded... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 1 month 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 25 matching lines...) Expand all
36 #include "FloatRect.h" 36 #include "FloatRect.h"
37 #include "GraphicsContext.h" 37 #include "GraphicsContext.h"
38 #include "Logging.h" 38 #include "Logging.h"
39 #include "NativeImageSkia.h" 39 #include "NativeImageSkia.h"
40 #include "NotImplemented.h" 40 #include "NotImplemented.h"
41 #include "PlatformContextSkia.h" 41 #include "PlatformContextSkia.h"
42 #include "PlatformString.h" 42 #include "PlatformString.h"
43 #include "SkiaUtils.h" 43 #include "SkiaUtils.h"
44 #include "SkShader.h" 44 #include "SkShader.h"
45 45
46 #include "base/gfx/image_operations.h" 46 #include "base/gfx/image_operations.h" // TODO(brettw) remove this dependency.
47 #include "base/gfx/platform_canvas.h" 47 #include "skia/ext/platform_canvas.h"
48 48
49 namespace WebCore { 49 namespace WebCore {
50 50
51 namespace { 51 namespace {
52 52
53 // Used by computeResamplingMode to tell how bitmaps should be resampled. 53 // Used by computeResamplingMode to tell how bitmaps should be resampled.
54 enum ResamplingMode { 54 enum ResamplingMode {
55 // Nearest neighbor resampling. Used when we detect that the page is 55 // Nearest neighbor resampling. Used when we detect that the page is
56 // trying to make a pattern by stretching a small bitmap very large. 56 // trying to make a pattern by stretching a small bitmap very large.
57 RESAMPLE_NONE, 57 RESAMPLE_NONE,
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 PassRefPtr<BitmapImageSingleFrameSkia> BitmapImageSingleFrameSkia::create( 447 PassRefPtr<BitmapImageSingleFrameSkia> BitmapImageSingleFrameSkia::create(
448 const SkBitmap& bitmap) 448 const SkBitmap& bitmap)
449 { 449 {
450 RefPtr<BitmapImageSingleFrameSkia> image(new BitmapImageSingleFrameSkia()); 450 RefPtr<BitmapImageSingleFrameSkia> image(new BitmapImageSingleFrameSkia());
451 if (!bitmap.copyTo(&image->m_nativeImage, bitmap.config())) 451 if (!bitmap.copyTo(&image->m_nativeImage, bitmap.config()))
452 return 0; 452 return 0;
453 return image.release(); 453 return image.release();
454 } 454 }
455 455
456 } // namespace WebCore 456 } // namespace WebCore
OLDNEW
« no previous file with comments | « webkit/port/platform/graphics/GraphicsContextSkia.cpp ('k') | webkit/port/platform/graphics/PlatformContextSkia.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698