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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp

Issue 1810853002: Blink Platform: Erase GraphicsLayerFactory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 21 matching lines...) Expand all
32 #include "platform/DragImage.h" 32 #include "platform/DragImage.h"
33 #include "platform/JSONValues.h" 33 #include "platform/JSONValues.h"
34 #include "platform/TraceEvent.h" 34 #include "platform/TraceEvent.h"
35 #include "platform/geometry/FloatRect.h" 35 #include "platform/geometry/FloatRect.h"
36 #include "platform/geometry/LayoutRect.h" 36 #include "platform/geometry/LayoutRect.h"
37 #include "platform/graphics/BitmapImage.h" 37 #include "platform/graphics/BitmapImage.h"
38 #include "platform/graphics/CompositorFactory.h" 38 #include "platform/graphics/CompositorFactory.h"
39 #include "platform/graphics/CompositorFilterOperations.h" 39 #include "platform/graphics/CompositorFilterOperations.h"
40 #include "platform/graphics/FirstPaintInvalidationTracking.h" 40 #include "platform/graphics/FirstPaintInvalidationTracking.h"
41 #include "platform/graphics/GraphicsContext.h" 41 #include "platform/graphics/GraphicsContext.h"
42 #include "platform/graphics/GraphicsLayerFactory.h"
43 #include "platform/graphics/Image.h" 42 #include "platform/graphics/Image.h"
44 #include "platform/graphics/LinkHighlight.h" 43 #include "platform/graphics/LinkHighlight.h"
45 #include "platform/graphics/filters/SkiaImageFilterBuilder.h" 44 #include "platform/graphics/filters/SkiaImageFilterBuilder.h"
46 #include "platform/graphics/paint/DrawingRecorder.h" 45 #include "platform/graphics/paint/DrawingRecorder.h"
47 #include "platform/graphics/paint/PaintController.h" 46 #include "platform/graphics/paint/PaintController.h"
48 #include "platform/scroll/ScrollableArea.h" 47 #include "platform/scroll/ScrollableArea.h"
49 #include "platform/text/TextStream.h" 48 #include "platform/text/TextStream.h"
50 #include "public/platform/Platform.h" 49 #include "public/platform/Platform.h"
51 #include "public/platform/WebCompositorSupport.h" 50 #include "public/platform/WebCompositorSupport.h"
52 #include "public/platform/WebFloatPoint.h" 51 #include "public/platform/WebFloatPoint.h"
(...skipping 26 matching lines...) Expand all
79 Vector<String> invalidationObjects; 78 Vector<String> invalidationObjects;
80 }; 79 };
81 80
82 typedef HashMap<const GraphicsLayer*, PaintInvalidationTrackingInfo> PaintInvali dationTrackingMap; 81 typedef HashMap<const GraphicsLayer*, PaintInvalidationTrackingInfo> PaintInvali dationTrackingMap;
83 static PaintInvalidationTrackingMap& paintInvalidationTrackingMap() 82 static PaintInvalidationTrackingMap& paintInvalidationTrackingMap()
84 { 83 {
85 DEFINE_STATIC_LOCAL(PaintInvalidationTrackingMap, map, ()); 84 DEFINE_STATIC_LOCAL(PaintInvalidationTrackingMap, map, ());
86 return map; 85 return map;
87 } 86 }
88 87
89 PassOwnPtr<GraphicsLayer> GraphicsLayer::create(GraphicsLayerFactory* factory, G raphicsLayerClient* client) 88 PassOwnPtr<GraphicsLayer> GraphicsLayer::create(GraphicsLayerClient* client)
90 { 89 {
91 return factory->createGraphicsLayer(client); 90 OwnPtr<GraphicsLayer> layer = adoptPtr(new GraphicsLayer(client));
91 return layer.release();
92 } 92 }
93 93
94 GraphicsLayer::GraphicsLayer(GraphicsLayerClient* client) 94 GraphicsLayer::GraphicsLayer(GraphicsLayerClient* client)
95 : m_client(client) 95 : m_client(client)
96 , m_backgroundColor(Color::transparent) 96 , m_backgroundColor(Color::transparent)
97 , m_opacity(1) 97 , m_opacity(1)
98 , m_blendMode(WebBlendModeNormal) 98 , m_blendMode(WebBlendModeNormal)
99 , m_hasTransformOrigin(false) 99 , m_hasTransformOrigin(false)
100 , m_contentsOpaque(false) 100 , m_contentsOpaque(false)
101 , m_shouldFlattenTransform(true) 101 , m_shouldFlattenTransform(true)
(...skipping 1128 matching lines...) Expand 10 before | Expand all | Expand 10 after
1230 { 1230 {
1231 if (!layer) { 1231 if (!layer) {
1232 fprintf(stderr, "Cannot showGraphicsLayerTree for (nil).\n"); 1232 fprintf(stderr, "Cannot showGraphicsLayerTree for (nil).\n");
1233 return; 1233 return;
1234 } 1234 }
1235 1235
1236 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); 1236 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo);
1237 fprintf(stderr, "%s\n", output.utf8().data()); 1237 fprintf(stderr, "%s\n", output.utf8().data());
1238 } 1238 }
1239 #endif 1239 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698