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

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

Issue 177473003: Use SkLayerDrawLooper::Builder to construct SkLayerDrawLooper. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add FINAL & DrawLooperBuilder::create(). Created 6 years, 9 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, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
3 * Copyright (C) 2008-2009 Torch Mobile, Inc. 3 * Copyright (C) 2008-2009 Torch Mobile, Inc.
4 * Copyright (C) 2013 Google Inc. All rights reserved. 4 * Copyright (C) 2013 Google Inc. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 15 matching lines...) Expand all
26 */ 26 */
27 27
28 #ifndef GraphicsContext_h 28 #ifndef GraphicsContext_h
29 #define GraphicsContext_h 29 #define GraphicsContext_h
30 30
31 #include "platform/PlatformExport.h" 31 #include "platform/PlatformExport.h"
32 #include "platform/TraceEvent.h" 32 #include "platform/TraceEvent.h"
33 #include "platform/fonts/Font.h" 33 #include "platform/fonts/Font.h"
34 #include "platform/geometry/FloatRect.h" 34 #include "platform/geometry/FloatRect.h"
35 #include "platform/graphics/DashArray.h" 35 #include "platform/graphics/DashArray.h"
36 #include "platform/graphics/DrawLooper.h" 36 #include "platform/graphics/DrawLooperBuilder.h"
37 #include "platform/graphics/ImageBufferSurface.h" 37 #include "platform/graphics/ImageBufferSurface.h"
38 #include "platform/graphics/ImageOrientation.h" 38 #include "platform/graphics/ImageOrientation.h"
39 #include "platform/graphics/GraphicsContextAnnotation.h" 39 #include "platform/graphics/GraphicsContextAnnotation.h"
40 #include "platform/graphics/GraphicsContextState.h" 40 #include "platform/graphics/GraphicsContextState.h"
41 #include "platform/graphics/skia/OpaqueRegionSkia.h" 41 #include "platform/graphics/skia/OpaqueRegionSkia.h"
42 #include "platform/graphics/skia/SkiaUtils.h" 42 #include "platform/graphics/skia/SkiaUtils.h"
43 #include "wtf/FastAllocBase.h" 43 #include "wtf/FastAllocBase.h"
44 #include "wtf/Forward.h" 44 #include "wtf/Forward.h"
45 #include "wtf/Noncopyable.h" 45 #include "wtf/Noncopyable.h"
46 #include "wtf/PassOwnPtr.h" 46 #include "wtf/PassOwnPtr.h"
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 void beginLayer(float opacity, CompositeOperator, const FloatRect* = 0, Colo rFilter = ColorFilterNone, ImageFilter* = 0); 307 void beginLayer(float opacity, CompositeOperator, const FloatRect* = 0, Colo rFilter = ColorFilterNone, ImageFilter* = 0);
308 void endLayer(); 308 void endLayer();
309 309
310 // Instead of being dispatched to the active canvas, draw commands following beginRecording() 310 // Instead of being dispatched to the active canvas, draw commands following beginRecording()
311 // are stored in a display list that can be replayed at a later time. 311 // are stored in a display list that can be replayed at a later time.
312 void beginRecording(const FloatRect& bounds); 312 void beginRecording(const FloatRect& bounds);
313 PassRefPtr<DisplayList> endRecording(); 313 PassRefPtr<DisplayList> endRecording();
314 314
315 bool hasShadow() const; 315 bool hasShadow() const;
316 void setShadow(const FloatSize& offset, float blur, const Color&, 316 void setShadow(const FloatSize& offset, float blur, const Color&,
317 DrawLooper::ShadowTransformMode = DrawLooper::ShadowRespectsTransforms, 317 DrawLooperBuilder::ShadowTransformMode = DrawLooperBuilder::ShadowRespec tsTransforms,
318 DrawLooper::ShadowAlphaMode = DrawLooper::ShadowRespectsAlpha); 318 DrawLooperBuilder::ShadowAlphaMode = DrawLooperBuilder::ShadowRespectsAl pha);
319 void clearShadow() { clearDrawLooper(); } 319 void clearShadow() { clearDrawLooper(); }
320 320
321 // It is assumed that this draw looper is used only for shadows 321 // It is assumed that this draw looper is used only for shadows
322 // (i.e. a draw looper is set if and only if there is a shadow). 322 // (i.e. a draw looper is set if and only if there is a shadow).
323 void setDrawLooper(const DrawLooper&); 323 // The builder passed into this method will be destroyed.
324 void setDrawLooper(PassOwnPtr<DrawLooperBuilder>);
Stephen Chennney 2014/03/03 13:40:48 The problem was that this should be a PassRefPtr,
Dominik Grewe 2014/03/03 13:45:23 The result of calling detachDrawLooper on the argu
324 void clearDrawLooper(); 325 void clearDrawLooper();
325 326
326 void drawFocusRing(const Vector<IntRect>&, int width, int offset, const Colo r&); 327 void drawFocusRing(const Vector<IntRect>&, int width, int offset, const Colo r&);
327 void drawFocusRing(const Path&, int width, int offset, const Color&); 328 void drawFocusRing(const Path&, int width, int offset, const Color&);
328 329
329 enum Edge { 330 enum Edge {
330 NoEdge = 0, 331 NoEdge = 0,
331 TopEdge = 1 << 1, 332 TopEdge = 1 << 1,
332 RightEdge = 1 << 2, 333 RightEdge = 1 << 2,
333 BottomEdge = 1 << 3, 334 BottomEdge = 1 << 3,
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 // FIXME: Make this go away: crbug.com/236892 510 // FIXME: Make this go away: crbug.com/236892
510 bool m_updatingControlTints : 1; 511 bool m_updatingControlTints : 1;
511 bool m_accelerated : 1; 512 bool m_accelerated : 1;
512 bool m_isCertainlyOpaque : 1; 513 bool m_isCertainlyOpaque : 1;
513 bool m_printing : 1; 514 bool m_printing : 1;
514 }; 515 };
515 516
516 } // namespace WebCore 517 } // namespace WebCore
517 518
518 #endif // GraphicsContext_h 519 #endif // GraphicsContext_h
OLDNEW
« no previous file with comments | « Source/platform/graphics/DrawLooperBuilder.cpp ('k') | Source/platform/graphics/GraphicsContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698