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

Side by Side Diff: cc/software_renderer.cc

Issue 11464007: Add the DelegatingRenderer class with its initialize path. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: initialize() Created 8 years 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 // 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/WebImage.h> 7 #include <public/WebImage.h>
8 8
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "cc/debug_border_draw_quad.h" 10 #include "cc/debug_border_draw_quad.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 } 58 }
59 59
60 SoftwareRenderer::SoftwareRenderer(RendererClient* client, ResourceProvider* res ourceProvider, SoftwareOutputDevice* outputDevice) 60 SoftwareRenderer::SoftwareRenderer(RendererClient* client, ResourceProvider* res ourceProvider, SoftwareOutputDevice* outputDevice)
61 : DirectRenderer(client, resourceProvider) 61 : DirectRenderer(client, resourceProvider)
62 , m_visible(true) 62 , m_visible(true)
63 , m_outputDevice(outputDevice) 63 , m_outputDevice(outputDevice)
64 , m_skCurrentCanvas(0) 64 , m_skCurrentCanvas(0)
65 { 65 {
66 m_resourceProvider->setDefaultResourceType(ResourceProvider::Bitmap); 66 m_resourceProvider->setDefaultResourceType(ResourceProvider::Bitmap);
67 67
68 m_capabilities.maxTextureSize = INT_MAX; 68 m_capabilities.maxTextureSize = m_resourceProvider->maxTextureSize();
69 m_capabilities.bestTextureFormat = GL_RGBA; 69 m_capabilities.bestTextureFormat = m_resourceProvider->bestTextureFormat();
70 m_capabilities.usingSetVisibility = true; 70 m_capabilities.usingSetVisibility = true;
71 // The updater can access bitmaps while the SoftwareRenderer is using them. 71 // The updater can access bitmaps while the SoftwareRenderer is using them.
72 m_capabilities.allowPartialTextureUpdates = true; 72 m_capabilities.allowPartialTextureUpdates = true;
73 73
74 viewportChanged(); 74 viewportChanged();
75 } 75 }
76 76
77 SoftwareRenderer::~SoftwareRenderer() 77 SoftwareRenderer::~SoftwareRenderer()
78 { 78 {
79 } 79 }
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 } 375 }
376 376
377 void SoftwareRenderer::setVisible(bool visible) 377 void SoftwareRenderer::setVisible(bool visible)
378 { 378 {
379 if (m_visible == visible) 379 if (m_visible == visible)
380 return; 380 return;
381 m_visible = visible; 381 m_visible = visible;
382 } 382 }
383 383
384 } // namespace cc 384 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698