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

Side by Side Diff: sky/engine/platform/graphics/gpu/DrawingBuffer.cpp

Issue 874633003: Remove WebCompositorSupport (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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) 2010, Google Inc. All rights reserved. 2 * Copyright (c) 2010, 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 20 matching lines...) Expand all
31 #include "sky/engine/config.h" 31 #include "sky/engine/config.h"
32 32
33 #include "sky/engine/platform/graphics/gpu/DrawingBuffer.h" 33 #include "sky/engine/platform/graphics/gpu/DrawingBuffer.h"
34 34
35 #include <algorithm> 35 #include <algorithm>
36 #include "gen/sky/platform/RuntimeEnabledFeatures.h" 36 #include "gen/sky/platform/RuntimeEnabledFeatures.h"
37 #include "sky/engine/platform/TraceEvent.h" 37 #include "sky/engine/platform/TraceEvent.h"
38 #include "sky/engine/platform/graphics/ImageBuffer.h" 38 #include "sky/engine/platform/graphics/ImageBuffer.h"
39 #include "sky/engine/platform/graphics/gpu/Extensions3DUtil.h" 39 #include "sky/engine/platform/graphics/gpu/Extensions3DUtil.h"
40 #include "sky/engine/public/platform/Platform.h" 40 #include "sky/engine/public/platform/Platform.h"
41 #include "sky/engine/public/platform/WebCompositorSupport.h"
42 #include "sky/engine/public/platform/WebExternalBitmap.h" 41 #include "sky/engine/public/platform/WebExternalBitmap.h"
43 #include "sky/engine/public/platform/WebExternalTextureLayer.h" 42 #include "sky/engine/public/platform/WebExternalTextureLayer.h"
44 #include "sky/engine/public/platform/WebGraphicsContext3D.h" 43 #include "sky/engine/public/platform/WebGraphicsContext3D.h"
45 #include "sky/engine/public/platform/WebGraphicsContext3DProvider.h" 44 #include "sky/engine/public/platform/WebGraphicsContext3DProvider.h"
46 #ifndef NDEBUG 45 #ifndef NDEBUG
47 #include "sky/engine/wtf/RefCountedLeakCounter.h" 46 #include "sky/engine/wtf/RefCountedLeakCounter.h"
48 #endif 47 #endif
49 48
50 namespace blink { 49 namespace blink {
51 50
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 } 497 }
499 498
500 Platform3DObject DrawingBuffer::framebuffer() const 499 Platform3DObject DrawingBuffer::framebuffer() const
501 { 500 {
502 return m_fbo; 501 return m_fbo;
503 } 502 }
504 503
505 WebLayer* DrawingBuffer::platformLayer() 504 WebLayer* DrawingBuffer::platformLayer()
506 { 505 {
507 if (!m_layer) { 506 if (!m_layer) {
508 m_layer = adoptPtr(Platform::current()->compositorSupport()->createExter nalTextureLayer(this)); 507 m_layer = nullptr;
508 CRASH(); // No compositor.
509 509
510 m_layer->setOpaque(!m_actualAttributes.alpha); 510 m_layer->setOpaque(!m_actualAttributes.alpha);
511 m_layer->setBlendBackgroundColor(m_actualAttributes.alpha); 511 m_layer->setBlendBackgroundColor(m_actualAttributes.alpha);
512 m_layer->setPremultipliedAlpha(m_actualAttributes.premultipliedAlpha); 512 m_layer->setPremultipliedAlpha(m_actualAttributes.premultipliedAlpha);
513 } 513 }
514 514
515 return m_layer->layer(); 515 return m_layer->layer();
516 } 516 }
517 517
518 void DrawingBuffer::paintCompositedResultsToCanvas(ImageBuffer* imageBuffer) 518 void DrawingBuffer::paintCompositedResultsToCanvas(ImageBuffer* imageBuffer)
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after
1041 void DrawingBuffer::deleteChromiumImageForTexture(TextureInfo* info) 1041 void DrawingBuffer::deleteChromiumImageForTexture(TextureInfo* info)
1042 { 1042 {
1043 if (info->imageId) { 1043 if (info->imageId) {
1044 m_context->releaseTexImage2DCHROMIUM(GL_TEXTURE_2D, info->imageId); 1044 m_context->releaseTexImage2DCHROMIUM(GL_TEXTURE_2D, info->imageId);
1045 m_context->destroyImageCHROMIUM(info->imageId); 1045 m_context->destroyImageCHROMIUM(info->imageId);
1046 info->imageId = 0; 1046 info->imageId = 0;
1047 } 1047 }
1048 } 1048 }
1049 1049
1050 } // namespace blink 1050 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/platform/graphics/filters/SkiaImageFilterBuilder.cpp ('k') | sky/engine/public/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698