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/modules/canvas2d/CanvasRenderingContext2D.cpp

Issue 2797213002: Fix BaseRenderingContext2D create/put/get-ImageData() for color managed canvas (Closed)
Patch Set: Rebaseline Created 3 years, 8 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) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc.
3 * All rights reserved. 3 * All rights reserved.
4 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies) 4 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies)
5 * Copyright (C) 2007 Alp Toker <alp@atoker.com> 5 * Copyright (C) 2007 Alp Toker <alp@atoker.com>
6 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> 6 * Copyright (C) 2008 Eric Seidel <eric@webkit.org>
7 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org> 7 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org>
8 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. 8 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved.
9 * Copyright (C) 2012, 2013 Intel Corporation. All rights reserved. 9 * Copyright (C) 2012, 2013 Intel Corporation. All rights reserved.
10 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. 10 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 if (ContextLostRestoredEventsEnabled()) { 272 if (ContextLostRestoredEventsEnabled()) {
273 Event* event(Event::Create(EventTypeNames::contextrestored)); 273 Event* event(Event::Create(EventTypeNames::contextrestored));
274 canvas()->DispatchEvent(event); 274 canvas()->DispatchEvent(event);
275 } 275 }
276 } 276 }
277 277
278 void CanvasRenderingContext2D::WillDrawImage(CanvasImageSource* source) const { 278 void CanvasRenderingContext2D::WillDrawImage(CanvasImageSource* source) const {
279 canvas()->WillDrawImageTo2DContext(source); 279 canvas()->WillDrawImageTo2DContext(source);
280 } 280 }
281 281
282 ImageData* CanvasRenderingContext2D::createImageData(
283 ImageData* image_data,
284 ExceptionState& exception_state) const {
285 return BaseRenderingContext2D::createImageData(image_data, exception_state);
286 }
287
288 ImageData* CanvasRenderingContext2D::createImageData(
289 int sw,
290 int sh,
291 ExceptionState& exception_state) const {
292 return BaseRenderingContext2D::createImageData(sw, sh, exception_state);
293 }
294
295 ImageData* CanvasRenderingContext2D::createImageData(
296 unsigned width,
297 unsigned height,
298 ImageDataColorSettings& color_settings,
299 ExceptionState& exception_state) const {
300 return ImageData::createImageData(width, height, color_settings,
fserb 2017/04/11 03:21:44 I'm a bit confused why don't you have to use BaseR
zakerinasab 2017/04/11 19:52:59 Done.
301 exception_state);
302 }
303
304 ImageData* CanvasRenderingContext2D::createImageData(
305 ImageDataArray& data_array,
306 unsigned width,
307 unsigned height,
308 ImageDataColorSettings& color_settings,
309 ExceptionState& exception_state) const {
310 return ImageData::createImageData(data_array, width, height, color_settings,
311 exception_state);
312 }
313
314 CanvasColorSpace CanvasRenderingContext2D::ColorSpace() const {
315 return CanvasRenderingContext::ColorSpace();
fserb 2017/04/11 03:21:44 fyi: Yeah, I'm fixing this on the next refactor. :
zakerinasab 2017/04/11 19:53:00 :)
316 }
317
318 String CanvasRenderingContext2D::ColorSpaceAsString() const {
319 return CanvasRenderingContext::ColorSpaceAsString();
320 }
321
322 CanvasPixelFormat CanvasRenderingContext2D::PixelFormat() const {
323 return CanvasRenderingContext::PixelFormat();
324 }
325
282 ColorBehavior CanvasRenderingContext2D::DrawImageColorBehavior() const { 326 ColorBehavior CanvasRenderingContext2D::DrawImageColorBehavior() const {
283 return CanvasRenderingContext::ColorBehaviorForMediaDrawnToCanvas(); 327 return CanvasRenderingContext::ColorBehaviorForMediaDrawnToCanvas();
284 } 328 }
285 329
286 void CanvasRenderingContext2D::Reset() { 330 void CanvasRenderingContext2D::Reset() {
287 // This is a multiple inherritance bootstrap 331 // This is a multiple inherritance bootstrap
288 BaseRenderingContext2D::Reset(); 332 BaseRenderingContext2D::Reset();
289 } 333 }
290 334
291 void CanvasRenderingContext2D::RestoreCanvasMatrixClipStack( 335 void CanvasRenderingContext2D::RestoreCanvasMatrixClipStack(
(...skipping 885 matching lines...) Expand 10 before | Expand all | Expand 10 after
1177 } 1221 }
1178 return true; 1222 return true;
1179 } 1223 }
1180 1224
1181 void CanvasRenderingContext2D::ResetUsageTracking() { 1225 void CanvasRenderingContext2D::ResetUsageTracking() {
1182 UsageCounters new_counters; 1226 UsageCounters new_counters;
1183 usage_counters_ = new_counters; 1227 usage_counters_ = new_counters;
1184 } 1228 }
1185 1229
1186 } // namespace blink 1230 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698