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

Side by Side Diff: content/renderer/pepper/ppb_image_data_impl.cc

Issue 1462163002: Move uncoupled code out of skia/ext/platform_device.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@no-draft-metadata
Patch Set: Trim superfluous SK_API Created 5 years 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 | « content/public/browser/render_widget_host.h ('k') | printing/metafile_skia_wrapper.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) 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 "content/renderer/pepper/ppb_image_data_impl.h" 5 #include "content/renderer/pepper/ppb_image_data_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "content/common/pepper_file_util.h" 12 #include "content/common/pepper_file_util.h"
13 #include "content/common/view_messages.h" 13 #include "content/common/view_messages.h"
14 #include "content/renderer/render_thread_impl.h" 14 #include "content/renderer/render_thread_impl.h"
15 #include "ppapi/c/pp_errors.h" 15 #include "ppapi/c/pp_errors.h"
16 #include "ppapi/c/pp_instance.h" 16 #include "ppapi/c/pp_instance.h"
17 #include "ppapi/c/pp_resource.h" 17 #include "ppapi/c/pp_resource.h"
18 #include "ppapi/c/ppb_image_data.h" 18 #include "ppapi/c/ppb_image_data.h"
19 #include "ppapi/thunk/thunk.h" 19 #include "ppapi/thunk/thunk.h"
20 #include "skia/ext/platform_canvas.h" 20 #include "skia/ext/platform_canvas.h"
21 #include "third_party/skia/include/core/SkColorPriv.h" 21 #include "third_party/skia/include/core/SkColorPriv.h"
22 #include "third_party/skia/include/core/SkDevice.h"
22 #include "third_party/skia/include/core/SkPixmap.h" 23 #include "third_party/skia/include/core/SkPixmap.h"
23 #include "ui/surface/transport_dib.h" 24 #include "ui/surface/transport_dib.h"
24 25
25 using ppapi::thunk::PPB_ImageData_API; 26 using ppapi::thunk::PPB_ImageData_API;
26 27
27 namespace content { 28 namespace content {
28 29
29 PPB_ImageData_Impl::PPB_ImageData_Impl(PP_Instance instance, 30 PPB_ImageData_Impl::PPB_ImageData_Impl(PP_Instance instance,
30 PPB_ImageData_Shared::ImageDataType type) 31 PPB_ImageData_Shared::ImageDataType type)
31 : Resource(ppapi::OBJECT_IS_IMPL, instance), 32 : Resource(ppapi::OBJECT_IS_IMPL, instance),
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 return skia_canvas_.get(); 268 return skia_canvas_.get();
268 } 269 }
269 270
270 const SkBitmap* ImageDataSimpleBackend::GetMappedBitmap() const { 271 const SkBitmap* ImageDataSimpleBackend::GetMappedBitmap() const {
271 if (!IsMapped()) 272 if (!IsMapped())
272 return NULL; 273 return NULL;
273 return &skia_bitmap_; 274 return &skia_bitmap_;
274 } 275 }
275 276
276 } // namespace content 277 } // namespace content
OLDNEW
« no previous file with comments | « content/public/browser/render_widget_host.h ('k') | printing/metafile_skia_wrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698