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

Side by Side Diff: webkit/plugins/ppapi/ppb_image_data_impl.cc

Issue 11189146: Eliminate implicit conversion from scoped_refptr<T> to T* (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « webkit/plugins/ppapi/ppb_image_data_impl.h ('k') | no next file » | 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) 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 skia::PlatformCanvas* PPB_ImageData_Impl::GetPlatformCanvas() { 114 skia::PlatformCanvas* PPB_ImageData_Impl::GetPlatformCanvas() {
115 return mapped_canvas_.get(); 115 return mapped_canvas_.get();
116 } 116 }
117 117
118 const SkBitmap* PPB_ImageData_Impl::GetMappedBitmap() const { 118 const SkBitmap* PPB_ImageData_Impl::GetMappedBitmap() const {
119 if (!mapped_canvas_.get()) 119 if (!mapped_canvas_.get())
120 return NULL; 120 return NULL;
121 return &skia::GetTopDevice(*mapped_canvas_)->accessBitmap(false); 121 return &skia::GetTopDevice(*mapped_canvas_)->accessBitmap(false);
122 } 122 }
123 123
124 void PPB_ImageData_Impl::Swap(PPB_ImageData_Impl* other) { 124 void PPB_ImageData_Impl::Swap(scoped_refptr<PPB_ImageData_Impl> other) {
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
OLDNEW
« no previous file with comments | « webkit/plugins/ppapi/ppb_image_data_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698