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

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

Issue 9192038: Relanding this with fixes to the mac dbg builder (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 months 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
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_scrollbar_impl.h" 5 #include "webkit/plugins/ppapi/ppb_scrollbar_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "ppapi/c/dev/ppp_scrollbar_dev.h" 10 #include "ppapi/c/dev/ppp_scrollbar_dev.h"
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 fmultiplier = static_cast<float>(multiplier); 127 fmultiplier = static_cast<float>(multiplier);
128 if (fmultiplier < 0) 128 if (fmultiplier < 0)
129 fmultiplier *= -1; 129 fmultiplier *= -1;
130 } 130 }
131 scrollbar_->scroll(direction, granularity, fmultiplier); 131 scrollbar_->scroll(direction, granularity, fmultiplier);
132 } 132 }
133 133
134 PP_Bool PPB_Scrollbar_Impl::PaintInternal(const gfx::Rect& rect, 134 PP_Bool PPB_Scrollbar_Impl::PaintInternal(const gfx::Rect& rect,
135 PPB_ImageData_Impl* image) { 135 PPB_ImageData_Impl* image) {
136 ImageDataAutoMapper mapper(image); 136 ImageDataAutoMapper mapper(image);
137 skia::PlatformCanvas* canvas = image->mapped_canvas(); 137 skia::PlatformCanvas* canvas = image->GetPlatformCanvas();
138 if (!canvas || !scrollbar_.get()) 138 if (!canvas || !scrollbar_.get())
139 return PP_FALSE; 139 return PP_FALSE;
140 scrollbar_->paint(webkit_glue::ToWebCanvas(canvas), rect); 140 scrollbar_->paint(webkit_glue::ToWebCanvas(canvas), rect);
141 141
142 #if defined(OS_WIN) 142 #if defined(OS_WIN)
143 if (base::win::GetVersion() == base::win::VERSION_XP) 143 if (base::win::GetVersion() == base::win::VERSION_XP)
144 skia::MakeOpaque(canvas, rect.x(), rect.y(), rect.width(), rect.height()); 144 skia::MakeOpaque(canvas, rect.x(), rect.y(), rect.width(), rect.height());
145 #endif 145 #endif
146 146
147 return PP_TRUE; 147 return PP_TRUE;
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 pp_rect.point.y = dirty_.y(); 239 pp_rect.point.y = dirty_.y();
240 pp_rect.size.width = dirty_.width(); 240 pp_rect.size.width = dirty_.width();
241 pp_rect.size.height = dirty_.height(); 241 pp_rect.size.height = dirty_.height();
242 dirty_ = gfx::Rect(); 242 dirty_ = gfx::Rect();
243 Invalidate(&pp_rect); 243 Invalidate(&pp_rect);
244 } 244 }
245 245
246 } // namespace ppapi 246 } // namespace ppapi
247 } // namespace webkit 247 } // namespace webkit
248 248
OLDNEW
« no previous file with comments | « webkit/plugins/ppapi/ppb_image_data_impl.cc ('k') | webkit/plugins/ppapi/resource_creation_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698