OLD | NEW |
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...) Loading... |
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 |
OLD | NEW |