| 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" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 // static | 55 // static |
| 56 const PPB_ImageData* PPB_ImageData_Impl::GetInterface() { | 56 const PPB_ImageData* PPB_ImageData_Impl::GetInterface() { |
| 57 return ::ppapi::thunk::GetPPB_ImageData_Thunk(); | 57 return ::ppapi::thunk::GetPPB_ImageData_Thunk(); |
| 58 } | 58 } |
| 59 | 59 |
| 60 // static | 60 // static |
| 61 const PPB_ImageDataTrusted* PPB_ImageData_Impl::GetTrustedInterface() { | 61 const PPB_ImageDataTrusted* PPB_ImageData_Impl::GetTrustedInterface() { |
| 62 return &ppb_imagedata_trusted; | 62 return &ppb_imagedata_trusted; |
| 63 } | 63 } |
| 64 | 64 |
| 65 ::ppapi::thunk::PPB_ImageData_API* PPB_ImageData_Impl::AsPPB_ImageData_API() { | 65 ::ppapi::thunk::PPB_ImageData_API* PPB_ImageData_Impl::AsImageData_API() { |
| 66 return this; | 66 return this; |
| 67 } | 67 } |
| 68 | 68 |
| 69 PPB_ImageData_Impl* PPB_ImageData_Impl::AsPPB_ImageData_Impl() { | 69 PPB_ImageData_Impl* PPB_ImageData_Impl::AsPPB_ImageData_Impl() { |
| 70 return this; | 70 return this; |
| 71 } | 71 } |
| 72 | 72 |
| 73 bool PPB_ImageData_Impl::Init(PP_ImageDataFormat format, | 73 bool PPB_ImageData_Impl::Init(PP_ImageDataFormat format, |
| 74 int width, int height, | 74 int width, int height, |
| 75 bool init_to_zero) { | 75 bool init_to_zero) { |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 swap(other->platform_image_, platform_image_); | 136 swap(other->platform_image_, platform_image_); |
| 137 swap(other->mapped_canvas_, mapped_canvas_); | 137 swap(other->mapped_canvas_, mapped_canvas_); |
| 138 std::swap(other->format_, format_); | 138 std::swap(other->format_, format_); |
| 139 std::swap(other->width_, width_); | 139 std::swap(other->width_, width_); |
| 140 std::swap(other->height_, height_); | 140 std::swap(other->height_, height_); |
| 141 } | 141 } |
| 142 | 142 |
| 143 } // namespace ppapi | 143 } // namespace ppapi |
| 144 } // namespace webkit | 144 } // namespace webkit |
| 145 | 145 |
| OLD | NEW |