| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/c/trusted/ppb_image_data_trusted.h" | 16 #include "ppapi/c/trusted/ppb_image_data_trusted.h" |
| 17 #include "ppapi/thunk/thunk.h" | 17 #include "ppapi/thunk/thunk.h" |
| 18 #include "third_party/skia/include/core/SkColorPriv.h" | 18 #include "third_party/skia/include/core/SkColorPriv.h" |
| 19 #include "webkit/plugins/ppapi/common.h" | 19 #include "webkit/plugins/ppapi/common.h" |
| 20 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" | 20 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" |
| 21 #include "webkit/plugins/ppapi/resource_helper.h" | 21 #include "webkit/plugins/ppapi/resource_helper.h" |
| 22 | 22 |
| 23 using ::ppapi::thunk::PPB_ImageData_API; | 23 using ::ppapi::thunk::PPB_ImageData_API; |
| 24 | 24 |
| 25 namespace webkit { | 25 namespace webkit { |
| 26 namespace ppapi { | 26 namespace ppapi { |
| 27 | 27 |
| 28 PPB_ImageData_Impl::PPB_ImageData_Impl(PP_Instance instance) | 28 PPB_ImageData_Impl::PPB_ImageData_Impl(PP_Instance instance) |
| 29 : Resource(instance), | 29 : Resource(::ppapi::OBJECT_IS_IMPL, instance), |
| 30 format_(PP_IMAGEDATAFORMAT_BGRA_PREMUL), | 30 format_(PP_IMAGEDATAFORMAT_BGRA_PREMUL), |
| 31 width_(0), | 31 width_(0), |
| 32 height_(0) { | 32 height_(0) { |
| 33 } | 33 } |
| 34 | 34 |
| 35 PPB_ImageData_Impl::~PPB_ImageData_Impl() { | 35 PPB_ImageData_Impl::~PPB_ImageData_Impl() { |
| 36 } | 36 } |
| 37 | 37 |
| 38 // static | 38 // static |
| 39 PP_Resource PPB_ImageData_Impl::Create(PP_Instance instance, | 39 PP_Resource PPB_ImageData_Impl::Create(PP_Instance instance, |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 swap(other->platform_image_, platform_image_); | 125 swap(other->platform_image_, platform_image_); |
| 126 swap(other->mapped_canvas_, mapped_canvas_); | 126 swap(other->mapped_canvas_, mapped_canvas_); |
| 127 std::swap(other->format_, format_); | 127 std::swap(other->format_, format_); |
| 128 std::swap(other->width_, width_); | 128 std::swap(other->width_, width_); |
| 129 std::swap(other->height_, height_); | 129 std::swap(other->height_, height_); |
| 130 } | 130 } |
| 131 | 131 |
| 132 } // namespace ppapi | 132 } // namespace ppapi |
| 133 } // namespace webkit | 133 } // namespace webkit |
| 134 | 134 |
| OLD | NEW |