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

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

Issue 6046009: Move base/mac_util.h to base/mac and use the base::mac namespace.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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/npapi/plugin_list_mac.mm ('k') | webkit/plugins/ppapi/ppb_graphics_2d_impl.cc » ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/ppapi_plugin_instance.h" 5 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/scoped_ptr.h" 9 #include "base/scoped_ptr.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 #include "webkit/plugins/ppapi/ppb_buffer_impl.h" 47 #include "webkit/plugins/ppapi/ppb_buffer_impl.h"
48 #include "webkit/plugins/ppapi/ppb_graphics_2d_impl.h" 48 #include "webkit/plugins/ppapi/ppb_graphics_2d_impl.h"
49 #include "webkit/plugins/ppapi/ppb_image_data_impl.h" 49 #include "webkit/plugins/ppapi/ppb_image_data_impl.h"
50 #include "webkit/plugins/ppapi/ppb_surface_3d_impl.h" 50 #include "webkit/plugins/ppapi/ppb_surface_3d_impl.h"
51 #include "webkit/plugins/ppapi/ppb_url_loader_impl.h" 51 #include "webkit/plugins/ppapi/ppb_url_loader_impl.h"
52 #include "webkit/plugins/ppapi/ppp_pdf.h" 52 #include "webkit/plugins/ppapi/ppp_pdf.h"
53 #include "webkit/plugins/ppapi/string.h" 53 #include "webkit/plugins/ppapi/string.h"
54 #include "webkit/plugins/ppapi/var.h" 54 #include "webkit/plugins/ppapi/var.h"
55 55
56 #if defined(OS_MACOSX) 56 #if defined(OS_MACOSX)
57 #include "base/mac_util.h" 57 #include "base/mac/mac_util.h"
58 #include "base/mac/scoped_cftyperef.h" 58 #include "base/mac/scoped_cftyperef.h"
59 #endif 59 #endif
60 60
61 #if defined(OS_WIN) 61 #if defined(OS_WIN)
62 #include "gfx/codec/jpeg_codec.h" 62 #include "gfx/codec/jpeg_codec.h"
63 #include "gfx/gdi_util.h" 63 #include "gfx/gdi_util.h"
64 #endif 64 #endif
65 65
66 using WebKit::WebBindings; 66 using WebKit::WebBindings;
67 using WebKit::WebCanvas; 67 using WebKit::WebCanvas;
(...skipping 1064 matching lines...) Expand 10 before | Expand all | Expand 10 after
1132 SkAutoLockPixels lock(bitmap); 1132 SkAutoLockPixels lock(bitmap);
1133 DCHECK(bitmap.getConfig() == SkBitmap::kARGB_8888_Config); 1133 DCHECK(bitmap.getConfig() == SkBitmap::kARGB_8888_Config);
1134 base::mac::ScopedCFTypeRef<CGDataProviderRef> data_provider( 1134 base::mac::ScopedCFTypeRef<CGDataProviderRef> data_provider(
1135 CGDataProviderCreateWithData( 1135 CGDataProviderCreateWithData(
1136 NULL, bitmap.getAddr32(0, 0), 1136 NULL, bitmap.getAddr32(0, 0),
1137 bitmap.rowBytes() * bitmap.height(), NULL)); 1137 bitmap.rowBytes() * bitmap.height(), NULL));
1138 base::mac::ScopedCFTypeRef<CGImageRef> image( 1138 base::mac::ScopedCFTypeRef<CGImageRef> image(
1139 CGImageCreate( 1139 CGImageCreate(
1140 bitmap.width(), bitmap.height(), 1140 bitmap.width(), bitmap.height(),
1141 8, 32, bitmap.rowBytes(), 1141 8, 32, bitmap.rowBytes(),
1142 mac_util::GetSystemColorSpace(), 1142 base::mac::GetSystemColorSpace(),
1143 kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host, 1143 kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host,
1144 data_provider, NULL, false, kCGRenderingIntentDefault)); 1144 data_provider, NULL, false, kCGRenderingIntentDefault));
1145 1145
1146 // Flip the transform 1146 // Flip the transform
1147 CGContextSaveGState(canvas); 1147 CGContextSaveGState(canvas);
1148 CGContextTranslateCTM(canvas, 0, canvas_height); 1148 CGContextTranslateCTM(canvas, 0, canvas_height);
1149 CGContextScaleCTM(canvas, 1.0, -1.0); 1149 CGContextScaleCTM(canvas, 1.0, -1.0);
1150 1150
1151 CGRect bounds; 1151 CGRect bounds;
1152 bounds.origin.x = dest_rect.x(); 1152 bounds.origin.x = dest_rect.x();
(...skipping 16 matching lines...) Expand all
1169 PPB_Surface3D_Impl* PluginInstance::bound_graphics_3d() const { 1169 PPB_Surface3D_Impl* PluginInstance::bound_graphics_3d() const {
1170 if (bound_graphics_.get() == NULL) 1170 if (bound_graphics_.get() == NULL)
1171 return NULL; 1171 return NULL;
1172 1172
1173 return bound_graphics_->Cast<PPB_Surface3D_Impl>(); 1173 return bound_graphics_->Cast<PPB_Surface3D_Impl>();
1174 } 1174 }
1175 1175
1176 } // namespace ppapi 1176 } // namespace ppapi
1177 } // namespace webkit 1177 } // namespace webkit
1178 1178
OLDNEW
« no previous file with comments | « webkit/plugins/npapi/plugin_list_mac.mm ('k') | webkit/plugins/ppapi/ppb_graphics_2d_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698