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

Side by Side Diff: Source/platform/graphics/skia/NativeImageSkia.cpp

Issue 729413003: Remove GraphicsContext::didDrawRect. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | « Source/platform/graphics/GraphicsContext.cpp ('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 /* 1 /*
2 * Copyright (c) 2008, Google Inc. All rights reserved. 2 * Copyright (c) 2008, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 SkPaint paint; 63 SkPaint paint;
64 context->preparePaintForDrawRectToRect(&paint, srcRect, destRect, compositeO p, blendMode, !isOpaque, isLazyDecoded, isDataComplete()); 64 context->preparePaintForDrawRectToRect(&paint, srcRect, destRect, compositeO p, blendMode, !isOpaque, isLazyDecoded, isDataComplete());
65 // We want to filter it if we decided to do interpolation above, or if 65 // We want to filter it if we decided to do interpolation above, or if
66 // there is something interesting going on with the matrix (like a rotation) . 66 // there is something interesting going on with the matrix (like a rotation) .
67 // Note: for serialization, we will want to subset the bitmap first so we 67 // Note: for serialization, we will want to subset the bitmap first so we
68 // don't send extra pixels. 68 // don't send extra pixels.
69 context->drawBitmapRect(bitmap(), &srcRect, destRect, &paint); 69 context->drawBitmapRect(bitmap(), &srcRect, destRect, &paint);
70 70
71 if (isLazyDecoded) 71 if (isLazyDecoded)
72 PlatformInstrumentation::didDrawLazyPixelRef(bitmap().getGenerationID()) ; 72 PlatformInstrumentation::didDrawLazyPixelRef(bitmap().getGenerationID()) ;
73 context->didDrawRect(destRect, paint, &bitmap());
74 } 73 }
75 74
76 static SkBitmap createBitmapWithSpace(const SkBitmap& bitmap, int spaceWidth, in t spaceHeight) 75 static SkBitmap createBitmapWithSpace(const SkBitmap& bitmap, int spaceWidth, in t spaceHeight)
77 { 76 {
78 SkImageInfo info = bitmap.info(); 77 SkImageInfo info = bitmap.info();
79 info = SkImageInfo::Make(info.width() + spaceWidth, info.height() + spaceHei ght, info.colorType(), kPremul_SkAlphaType); 78 info = SkImageInfo::Make(info.width() + spaceWidth, info.height() + spaceHei ght, info.colorType(), kPremul_SkAlphaType);
80 79
81 SkBitmap result; 80 SkBitmap result;
82 result.allocPixels(info); 81 result.allocPixels(info);
83 result.eraseColor(SK_ColorTRANSPARENT); 82 result.eraseColor(SK_ColorTRANSPARENT);
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 paint.setColorFilter(context->colorFilter()); 157 paint.setColorFilter(context->colorFilter());
159 paint.setFilterLevel(static_cast<SkPaint::FilterLevel>(resampling)); 158 paint.setFilterLevel(static_cast<SkPaint::FilterLevel>(resampling));
160 159
161 if (isLazyDecoded) 160 if (isLazyDecoded)
162 PlatformInstrumentation::didDrawLazyPixelRef(bitmap().getGenerationID()) ; 161 PlatformInstrumentation::didDrawLazyPixelRef(bitmap().getGenerationID()) ;
163 162
164 context->drawRect(destRect, paint); 163 context->drawRect(destRect, paint);
165 } 164 }
166 165
167 } // namespace blink 166 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/graphics/GraphicsContext.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698