| 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 "webkit/plugins/ppapi/ppb_image_data_impl.h" | 5 #include "webkit/plugins/ppapi/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 "skia/ext/platform_canvas.h" | 12 #include "skia/ext/platform_canvas.h" |
| 13 #include "ppapi/c/pp_instance.h" | 13 #include "ppapi/c/pp_instance.h" |
| 14 #include "ppapi/c/pp_resource.h" | 14 #include "ppapi/c/pp_resource.h" |
| 15 #include "ppapi/c/ppb_image_data.h" | 15 #include "ppapi/c/ppb_image_data.h" |
| 16 #include "ppapi/thunk/thunk.h" | 16 #include "ppapi/thunk/thunk.h" |
| 17 #include "third_party/skia/include/core/SkColorPriv.h" | 17 #include "third_party/skia/include/core/SkColorPriv.h" |
| 18 #include "webkit/plugins/ppapi/common.h" | 18 #include "webkit/plugins/ppapi/common.h" |
| 19 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" | |
| 20 #include "webkit/plugins/ppapi/resource_helper.h" | 19 #include "webkit/plugins/ppapi/resource_helper.h" |
| 21 | 20 |
| 22 using ::ppapi::thunk::PPB_ImageData_API; | 21 using ::ppapi::thunk::PPB_ImageData_API; |
| 23 | 22 |
| 24 namespace webkit { | 23 namespace webkit { |
| 25 namespace ppapi { | 24 namespace ppapi { |
| 26 | 25 |
| 27 PPB_ImageData_Impl::PPB_ImageData_Impl(PP_Instance instance, | 26 PPB_ImageData_Impl::PPB_ImageData_Impl(PP_Instance instance, |
| 28 PPB_ImageData_Shared::ImageDataType type) | 27 PPB_ImageData_Shared::ImageDataType type) |
| 29 : Resource(::ppapi::OBJECT_IS_IMPL, instance), | 28 : Resource(::ppapi::OBJECT_IS_IMPL, instance), |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 } | 269 } |
| 271 | 270 |
| 272 const SkBitmap* ImageDataSimpleBackend::GetMappedBitmap() const { | 271 const SkBitmap* ImageDataSimpleBackend::GetMappedBitmap() const { |
| 273 if (!IsMapped()) | 272 if (!IsMapped()) |
| 274 return NULL; | 273 return NULL; |
| 275 return &skia_bitmap_; | 274 return &skia_bitmap_; |
| 276 } | 275 } |
| 277 | 276 |
| 278 } // namespace ppapi | 277 } // namespace ppapi |
| 279 } // namespace webkit | 278 } // namespace webkit |
| OLD | NEW |