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

Side by Side Diff: Source/core/platform/graphics/GraphicsContext3D.h

Issue 14113033: Landing https://codereview.chromium.org/13842017 for jun.a.jiang@intel.com: Add OES_texture_half_fl… (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 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 | Annotate | Revision Log
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 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 514
515 515
516 // Attempt to enumerate all possible native image formats to 516 // Attempt to enumerate all possible native image formats to
517 // reduce the amount of temporary allocations during texture 517 // reduce the amount of temporary allocations during texture
518 // uploading. This enum must be public because it is accessed 518 // uploading. This enum must be public because it is accessed
519 // by non-member functions. 519 // by non-member functions.
520 enum DataFormat { 520 enum DataFormat {
521 DataFormatRGBA8 = 0, 521 DataFormatRGBA8 = 0,
522 DataFormatRGBA16Little, 522 DataFormatRGBA16Little,
523 DataFormatRGBA16Big, 523 DataFormatRGBA16Big,
524 DataFormatRGBA16F,
524 DataFormatRGBA32F, 525 DataFormatRGBA32F,
525 DataFormatRGB8, 526 DataFormatRGB8,
526 DataFormatRGB16Little, 527 DataFormatRGB16Little,
527 DataFormatRGB16Big, 528 DataFormatRGB16Big,
529 DataFormatRGB16F,
528 DataFormatRGB32F, 530 DataFormatRGB32F,
529 DataFormatBGR8, 531 DataFormatBGR8,
530 DataFormatBGRA8, 532 DataFormatBGRA8,
531 DataFormatBGRA16Little, 533 DataFormatBGRA16Little,
532 DataFormatBGRA16Big, 534 DataFormatBGRA16Big,
533 DataFormatARGB8, 535 DataFormatARGB8,
534 DataFormatARGB16Little, 536 DataFormatARGB16Little,
535 DataFormatARGB16Big, 537 DataFormatARGB16Big,
536 DataFormatABGR8, 538 DataFormatABGR8,
537 DataFormatRGBA5551, 539 DataFormatRGBA5551,
538 DataFormatRGBA4444, 540 DataFormatRGBA4444,
539 DataFormatRGB565, 541 DataFormatRGB565,
540 DataFormatR8, 542 DataFormatR8,
541 DataFormatR16Little, 543 DataFormatR16Little,
542 DataFormatR16Big, 544 DataFormatR16Big,
545 DataFormatR16F,
543 DataFormatR32F, 546 DataFormatR32F,
544 DataFormatRA8, 547 DataFormatRA8,
545 DataFormatRA16Little, 548 DataFormatRA16Little,
546 DataFormatRA16Big, 549 DataFormatRA16Big,
550 DataFormatRA16F,
547 DataFormatRA32F, 551 DataFormatRA32F,
548 DataFormatAR8, 552 DataFormatAR8,
549 DataFormatAR16Little, 553 DataFormatAR16Little,
550 DataFormatAR16Big, 554 DataFormatAR16Big,
551 DataFormatA8, 555 DataFormatA8,
552 DataFormatA16Little, 556 DataFormatA16Little,
553 DataFormatA16Big, 557 DataFormatA16Big,
558 DataFormatA16F,
554 DataFormatA32F, 559 DataFormatA32F,
555 DataFormatNumFormats 560 DataFormatNumFormats
556 }; 561 };
557 562
558 // Check if the format is one of the formats from the ImageData or DOM eleme nts. 563 // Check if the format is one of the formats from the ImageData or DOM eleme nts.
559 // The formats from ImageData is always RGBA8. 564 // The formats from ImageData is always RGBA8.
560 // The formats from DOM elements vary with Graphics ports. It can only be RG BA8 or BGRA8 for non-CG port while a little more for CG port. 565 // The formats from DOM elements vary with Graphics ports. It can only be RG BA8 or BGRA8 for non-CG port while a little more for CG port.
561 static ALWAYS_INLINE bool srcFormatComeFromDOMElementOrImageData(DataFormat SrcFormat) 566 static ALWAYS_INLINE bool srcFormatComeFromDOMElementOrImageData(DataFormat SrcFormat)
562 { 567 {
563 return SrcFormat == DataFormatBGRA8 || SrcFormat == DataFormatRGBA8; 568 return SrcFormat == DataFormatBGRA8 || SrcFormat == DataFormatRGBA8;
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
879 // Errors raised by synthesizeGLError(). 884 // Errors raised by synthesizeGLError().
880 ListHashSet<GC3Denum> m_syntheticErrors; 885 ListHashSet<GC3Denum> m_syntheticErrors;
881 886
882 friend class GraphicsContext3DPrivate; 887 friend class GraphicsContext3DPrivate;
883 OwnPtr<GraphicsContext3DPrivate> m_private; 888 OwnPtr<GraphicsContext3DPrivate> m_private;
884 }; 889 };
885 890
886 } // namespace WebCore 891 } // namespace WebCore
887 892
888 #endif // GraphicsContext3D_h 893 #endif // GraphicsContext3D_h
OLDNEW
« no previous file with comments | « Source/core/html/canvas/WebGLRenderingContext.cpp ('k') | Source/core/platform/graphics/GraphicsContext3D.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698