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

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

Issue 11269022: Add Vector2d classes that represent offsets, instead of using Point. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebasefinal 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
OLDNEW
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_graphics_2d_impl.h" 5 #include "webkit/plugins/ppapi/ppb_graphics_2d_impl.h"
6 6
7 #include <iterator> 7 #include <iterator>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 690 matching lines...) Expand 10 before | Expand all | Expand 10 after
701 paint.setXfermodeMode(SkXfermode::kSrc_Mode); 701 paint.setXfermodeMode(SkXfermode::kSrc_Mode);
702 backing_canvas->drawBitmapRect(*image->GetMappedBitmap(), 702 backing_canvas->drawBitmapRect(*image->GetMappedBitmap(),
703 &src_irect, dest_rect, &paint); 703 &src_irect, dest_rect, &paint);
704 } 704 }
705 } 705 }
706 706
707 void PPB_Graphics2D_Impl::ExecuteScroll(const gfx::Rect& clip, 707 void PPB_Graphics2D_Impl::ExecuteScroll(const gfx::Rect& clip,
708 int dx, int dy, 708 int dx, int dy,
709 gfx::Rect* invalidated_rect) { 709 gfx::Rect* invalidated_rect) {
710 gfx::ScrollCanvas(image_data_->GetCanvas(), 710 gfx::ScrollCanvas(image_data_->GetCanvas(),
711 clip, gfx::Point(dx, dy)); 711 clip, gfx::Vector2d(dx, dy));
danakj 2012/10/29 19:17:20 fits on one line
712 *invalidated_rect = clip; 712 *invalidated_rect = clip;
713 } 713 }
714 714
715 void PPB_Graphics2D_Impl::ExecuteReplaceContents(PPB_ImageData_Impl* image, 715 void PPB_Graphics2D_Impl::ExecuteReplaceContents(PPB_ImageData_Impl* image,
716 gfx::Rect* invalidated_rect, 716 gfx::Rect* invalidated_rect,
717 PP_Resource* old_image_data) { 717 PP_Resource* old_image_data) {
718 if (image->format() != image_data_->format()) { 718 if (image->format() != image_data_->format()) {
719 DCHECK(image->width() == image_data_->width() && 719 DCHECK(image->width() == image_data_->width() &&
720 image->height() == image_data_->height()); 720 image->height() == image_data_->height());
721 // Convert the image data if the format does not match. 721 // Convert the image data if the format does not match.
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
762 } 762 }
763 763
764 bool PPB_Graphics2D_Impl::HasPendingFlush() const { 764 bool PPB_Graphics2D_Impl::HasPendingFlush() const {
765 return !unpainted_flush_callback_.is_null() || 765 return !unpainted_flush_callback_.is_null() ||
766 !painted_flush_callback_.is_null() || 766 !painted_flush_callback_.is_null() ||
767 offscreen_flush_pending_; 767 offscreen_flush_pending_;
768 } 768 }
769 769
770 } // namespace ppapi 770 } // namespace ppapi
771 } // namespace webkit 771 } // namespace webkit
OLDNEW
« ui/base/dragdrop/drag_utils.cc ('K') | « webkit/plugins/ppapi/ppapi_plugin_instance.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698