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

Side by Side Diff: third_party/WebKit/Source/web/WebViewImpl.cpp

Issue 1412593003: Remove WebGraphicsContext/WebGraphicsContextImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove another include WebGraphicsContext.h Created 5 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 #include "platform/PlatformGestureEvent.h" 106 #include "platform/PlatformGestureEvent.h"
107 #include "platform/PlatformKeyboardEvent.h" 107 #include "platform/PlatformKeyboardEvent.h"
108 #include "platform/PlatformMouseEvent.h" 108 #include "platform/PlatformMouseEvent.h"
109 #include "platform/RuntimeEnabledFeatures.h" 109 #include "platform/RuntimeEnabledFeatures.h"
110 #include "platform/TraceEvent.h" 110 #include "platform/TraceEvent.h"
111 #include "platform/UserGestureIndicator.h" 111 #include "platform/UserGestureIndicator.h"
112 #include "platform/exported/WebActiveGestureAnimation.h" 112 #include "platform/exported/WebActiveGestureAnimation.h"
113 #include "platform/fonts/FontCache.h" 113 #include "platform/fonts/FontCache.h"
114 #include "platform/graphics/Color.h" 114 #include "platform/graphics/Color.h"
115 #include "platform/graphics/FirstPaintInvalidationTracking.h" 115 #include "platform/graphics/FirstPaintInvalidationTracking.h"
116 #include "platform/graphics/GraphicsContext.h"
116 #include "platform/graphics/Image.h" 117 #include "platform/graphics/Image.h"
117 #include "platform/graphics/ImageBuffer.h" 118 #include "platform/graphics/ImageBuffer.h"
118 #include "platform/graphics/gpu/DrawingBuffer.h" 119 #include "platform/graphics/gpu/DrawingBuffer.h"
120 #include "platform/graphics/paint/DrawingRecorder.h"
119 #include "platform/scroll/ScrollbarTheme.h" 121 #include "platform/scroll/ScrollbarTheme.h"
120 #include "platform/weborigin/SchemeRegistry.h" 122 #include "platform/weborigin/SchemeRegistry.h"
121 #include "public/platform/Platform.h" 123 #include "public/platform/Platform.h"
122 #include "public/platform/WebCompositeAndReadbackAsyncCallback.h" 124 #include "public/platform/WebCompositeAndReadbackAsyncCallback.h"
123 #include "public/platform/WebCompositorSupport.h" 125 #include "public/platform/WebCompositorSupport.h"
124 #include "public/platform/WebDragData.h" 126 #include "public/platform/WebDragData.h"
125 #include "public/platform/WebFloatPoint.h" 127 #include "public/platform/WebFloatPoint.h"
126 #include "public/platform/WebGestureCurve.h" 128 #include "public/platform/WebGestureCurve.h"
127 #include "public/platform/WebImage.h" 129 #include "public/platform/WebImage.h"
128 #include "public/platform/WebLayerTreeView.h" 130 #include "public/platform/WebLayerTreeView.h"
129 #include "public/platform/WebURLRequest.h" 131 #include "public/platform/WebURLRequest.h"
130 #include "public/platform/WebVector.h" 132 #include "public/platform/WebVector.h"
131 #include "public/web/WebAXObject.h" 133 #include "public/web/WebAXObject.h"
132 #include "public/web/WebActiveWheelFlingParameters.h" 134 #include "public/web/WebActiveWheelFlingParameters.h"
133 #include "public/web/WebAutofillClient.h" 135 #include "public/web/WebAutofillClient.h"
134 #include "public/web/WebElement.h" 136 #include "public/web/WebElement.h"
135 #include "public/web/WebFrame.h" 137 #include "public/web/WebFrame.h"
136 #include "public/web/WebFrameClient.h" 138 #include "public/web/WebFrameClient.h"
137 #include "public/web/WebGraphicsContext.h"
138 #include "public/web/WebHitTestResult.h" 139 #include "public/web/WebHitTestResult.h"
139 #include "public/web/WebInputElement.h" 140 #include "public/web/WebInputElement.h"
140 #include "public/web/WebMeaningfulLayout.h" 141 #include "public/web/WebMeaningfulLayout.h"
141 #include "public/web/WebMediaPlayerAction.h" 142 #include "public/web/WebMediaPlayerAction.h"
142 #include "public/web/WebNode.h" 143 #include "public/web/WebNode.h"
143 #include "public/web/WebPlugin.h" 144 #include "public/web/WebPlugin.h"
144 #include "public/web/WebPluginAction.h" 145 #include "public/web/WebPluginAction.h"
145 #include "public/web/WebRange.h" 146 #include "public/web/WebRange.h"
146 #include "public/web/WebSelection.h" 147 #include "public/web/WebSelection.h"
147 #include "public/web/WebTextInputInfo.h" 148 #include "public/web/WebTextInputInfo.h"
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 explicit ColorOverlay(WebColor color) 303 explicit ColorOverlay(WebColor color)
303 : m_color(color) 304 : m_color(color)
304 { 305 {
305 } 306 }
306 307
307 virtual ~ColorOverlay() 308 virtual ~ColorOverlay()
308 { 309 {
309 } 310 }
310 311
311 private: 312 private:
312 void paintPageOverlay(WebGraphicsContext* context, const WebSize& size) cons t override 313 void paintPageOverlay(const PageOverlay& pageOverlay, GraphicsContext& graph icsContext, const WebSize& size) const override
313 { 314 {
314 WebFloatRect rect(0, 0, size.width, size.height); 315 if (DrawingRecorder::useCachedDrawingIfPossible(graphicsContext, pageOve rlay, DisplayItem::PageOverlay))
315 WebCanvas* canvas = context->beginDrawing(rect); 316 return;
316 SkPaint paint; 317 FloatRect rect(0, 0, size.width, size.height);
317 paint.setColor(m_color); 318 DrawingRecorder drawingRecorder(graphicsContext, pageOverlay, DisplayIte m::PageOverlay, rect);
318 paint.setStyle(SkPaint::kFill_Style); 319 graphicsContext.fillRect(rect, m_color);
319 canvas->drawRectCoords(0, 0, size.width, size.height, paint);
320 context->endDrawing();
321 } 320 }
322 321
323 WebColor m_color; 322 WebColor m_color;
324 }; 323 };
325 324
326 } // namespace 325 } // namespace
327 326
328 // WebView ---------------------------------------------------------------- 327 // WebView ----------------------------------------------------------------
329 328
330 WebView* WebView::create(WebViewClient* client) 329 WebView* WebView::create(WebViewClient* client)
(...skipping 4103 matching lines...) Expand 10 before | Expand all | Expand 10 after
4434 if (m_pageColorOverlay) 4433 if (m_pageColorOverlay)
4435 m_pageColorOverlay->update(); 4434 m_pageColorOverlay->update();
4436 if (InspectorOverlay* overlay = inspectorOverlay()) { 4435 if (InspectorOverlay* overlay = inspectorOverlay()) {
4437 PageOverlay* inspectorPageOverlay = overlay->pageOverlay(); 4436 PageOverlay* inspectorPageOverlay = overlay->pageOverlay();
4438 if (inspectorPageOverlay) 4437 if (inspectorPageOverlay)
4439 inspectorPageOverlay->update(); 4438 inspectorPageOverlay->update();
4440 } 4439 }
4441 } 4440 }
4442 4441
4443 } // namespace blink 4442 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698