| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "cc/software_renderer.h" | 5 #include "cc/software_renderer.h" |
| 6 | 6 |
| 7 #include <public/WebCompositorSoftwareOutputDevice.h> | 7 #include <public/WebCompositorSoftwareOutputDevice.h> |
| 8 #include <public/WebImage.h> | 8 #include <public/WebImage.h> |
| 9 #include <public/WebSize.h> | 9 #include <public/WebSize.h> |
| 10 | 10 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 SoftwareRenderer::SoftwareRenderer(RendererClient* client, ResourceProvider* res
ourceProvider, WebCompositorSoftwareOutputDevice* outputDevice) | 64 SoftwareRenderer::SoftwareRenderer(RendererClient* client, ResourceProvider* res
ourceProvider, WebCompositorSoftwareOutputDevice* outputDevice) |
| 65 : DirectRenderer(client, resourceProvider) | 65 : DirectRenderer(client, resourceProvider) |
| 66 , m_visible(true) | 66 , m_visible(true) |
| 67 , m_outputDevice(outputDevice) | 67 , m_outputDevice(outputDevice) |
| 68 , m_skCurrentCanvas(0) | 68 , m_skCurrentCanvas(0) |
| 69 { | 69 { |
| 70 m_resourceProvider->setDefaultResourceType(ResourceProvider::Bitmap); | 70 m_resourceProvider->setDefaultResourceType(ResourceProvider::Bitmap); |
| 71 | 71 |
| 72 m_capabilities.maxTextureSize = INT_MAX; | 72 m_capabilities.maxTextureSize = INT_MAX; |
| 73 m_capabilities.bestTextureFormat = GL_RGBA; | 73 m_capabilities.bestTextureFormat = GL_RGBA; |
| 74 m_capabilities.contextHasCachedFrontBuffer = true; | |
| 75 m_capabilities.usingSetVisibility = true; | 74 m_capabilities.usingSetVisibility = true; |
| 76 // The updater can access bitmaps while the SoftwareRenderer is using them. | 75 // The updater can access bitmaps while the SoftwareRenderer is using them. |
| 77 m_capabilities.allowPartialTextureUpdates = true; | 76 m_capabilities.allowPartialTextureUpdates = true; |
| 78 | 77 |
| 79 viewportChanged(); | 78 viewportChanged(); |
| 80 } | 79 } |
| 81 | 80 |
| 82 SoftwareRenderer::~SoftwareRenderer() | 81 SoftwareRenderer::~SoftwareRenderer() |
| 83 { | 82 { |
| 84 } | 83 } |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 } | 379 } |
| 381 | 380 |
| 382 void SoftwareRenderer::setVisible(bool visible) | 381 void SoftwareRenderer::setVisible(bool visible) |
| 383 { | 382 { |
| 384 if (m_visible == visible) | 383 if (m_visible == visible) |
| 385 return; | 384 return; |
| 386 m_visible = visible; | 385 m_visible = visible; |
| 387 } | 386 } |
| 388 | 387 |
| 389 } // namespace cc | 388 } // namespace cc |
| OLD | NEW |