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

Side by Side Diff: Source/platform/graphics/GraphicsContext.cpp

Issue 177473003: Use SkLayerDrawLooper::Builder to construct SkLayerDrawLooper. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 10 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2003, 2004, 2005, 2006, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2004, 2005, 2006, 2009 Apple Inc. All rights reserved.
3 * Copyright (C) 2013 Google Inc. All rights reserved. 3 * Copyright (C) 2013 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 clearShadow(); 336 clearShadow();
337 return; 337 return;
338 } 338 }
339 339
340 DrawLooper drawLooper; 340 DrawLooper drawLooper;
341 drawLooper.addShadow(offset, blur, color, shadowTransformMode, shadowAlphaMo de); 341 drawLooper.addShadow(offset, blur, color, shadowTransformMode, shadowAlphaMo de);
342 drawLooper.addUnmodifiedContent(); 342 drawLooper.addUnmodifiedContent();
343 setDrawLooper(drawLooper); 343 setDrawLooper(drawLooper);
344 } 344 }
345 345
346 void GraphicsContext::setDrawLooper(const DrawLooper& drawLooper) 346 void GraphicsContext::setDrawLooper(DrawLooper& drawLooper)
347 { 347 {
348 if (paintingDisabled()) 348 if (paintingDisabled())
349 return; 349 return;
350 350
351 mutableState()->m_looper = drawLooper.skDrawLooper(); 351 mutableState()->m_looper = drawLooper.skDrawLooper();
352 } 352 }
353 353
354 void GraphicsContext::clearDrawLooper() 354 void GraphicsContext::clearDrawLooper()
355 { 355 {
356 if (paintingDisabled()) 356 if (paintingDisabled())
(...skipping 1675 matching lines...) Expand 10 before | Expand all | Expand 10 after
2032 2032
2033 void GraphicsContext::didDrawTextInRect(const SkRect& textRect) 2033 void GraphicsContext::didDrawTextInRect(const SkRect& textRect)
2034 { 2034 {
2035 if (m_trackTextRegion) { 2035 if (m_trackTextRegion) {
2036 TRACE_EVENT0("skia", "PlatformContextSkia::trackTextRegion"); 2036 TRACE_EVENT0("skia", "PlatformContextSkia::trackTextRegion");
2037 m_textRegion.join(textRect); 2037 m_textRegion.join(textRect);
2038 } 2038 }
2039 } 2039 }
2040 2040
2041 } 2041 }
OLDNEW
« Source/platform/graphics/GraphicsContext.h ('K') | « Source/platform/graphics/GraphicsContext.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698